Geometry Problem Concerning Lengths with a Square and Two Right Triangles Square $ABCD$ has side length 13, and points $E$ and $F$ are exterior to the square such that $BE = DF = 5$ and $AE = CF = 12$. Find $EF^2$.
Click Here for the Attached Diagram

Solution:
First, by Pythagoras, triangles $ABE$ and $CDF$ are right triangles. We extend lines $\overline{EA}$, $\overline{EB}$, $\overline{FC}$, and $\overline{FD}$ to construct quadrilateral $EGFH$.

Right triangles $ABE$ and $CDF$ are congruent, so $\angle DCF = \angle EAB$, which means $\angle GDA = \angle EAB$. Also, $AD = AB$, so triangles $EAB$ and $GDA$ are congruent. Hence, $\angle AGD = \angle AEB = 90^\circ$.
Also, $GE = AG + AE = 5 + 12 = 17$, and $GF = DF + DG = 5 + 12 = 17$, so triangle $EGF$ is a right isosceles triangle. Then $EF = GE \sqrt{2} = 17 \sqrt{2}$, so $EF^2 = (17 \sqrt{2})^2 = \boxed{578}$.
