Work in a square-pixel comp and make a square mask on a solid. Center the mask at the exact center of the solid.
Duplicate the solid. Rotate it 45 degrees and duplicate it again.
Select the non-rotated solid. Scale its mask to make the top & bottom match the corners of the rotated solids. Move the non-rotated solid's Anchor Point to the left edge. Set this solid's Horizontal scale ONLY to zero.
You should now see just one square rotated 45 degrees. To create the animation, animate the horizontal position of a rotated solid to the right, and animate the horizontal scale of the non-rotated solid.
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA