I was looking around and saw that this question has been solved before. The previous answer stated
"Begin by moving F a little to the left so that the square has begun it's rotation.
Call the angle EFB theta, call the side of the square b, and BF and FC x and y respectively.
Fill in the angles of the two triangles BEF and FGC and apply the sine rule in both triangles.
Use the fact that x + y = a, the length of the side of the equilateral triangle to deduce that
So the size of the square varies as it rotates.
Now look at your larger diagram, the one with the dotted line running from D.
Call the point where this line meets BC N, then DN/DF = sin(angle NFD).
DF is the diagonal of the square = b.sqrt(2) and angle NFD = theta + 45 deg, so you can now work out DN.
You should find that it's a constant, equal to a.sqrt(3)/(1 + sqrt(3))."
Made by Guest.