In a right triangle $ABC$ with $\angle ACB$ the right angle, point $D$ is on the side $\overline{AB}$. Segment $\overline{BE}$ is perpendicular to $\overline{CD}$ and intersects $\overline{CD}$ at point $E$. Point $F$ is on $\overline{DE}$ such that $CE=EF$. Segment $\overline{FG}$ is perpendicular to $\overline{CD}$ and intersects $\overline{BD}$ at $G$.
Prove that $m\angle AFD=m\angle BCG$.
I am not familiar with results beyond geometry taught in high school. Maybe some ingenious auxiliary line can be drawn to solve the problem beautifully, but I cannot come up with any good idea.


Set $X$ as the reflection of $F$ over the line $AB$. By Thales' theorem, we see that the quadrilateral $DFGX$ is cyclic. We can also see that $\overline{BC}=\overline{BF}=\overline{BX}$. It follows that $B$ is the circumcentre of the triangle $CFX$. Because $AC\perp BC$, the line $AC$ is tangent to this circle.
Now we see that $$\angle XGA=\angle XFD=\angle XCA,$$ where the second equality follows from $AC$ being tangent to the circle $CFX$. This means that the quadrilateral $ACGX$ is cyclic.
We finish the proof by noting that $$\angle GCB=\frac{\pi}{2}-\angle ACG=\frac{\pi}{2}-\pi+\angle GXA=\angle AFG-\frac{\pi}{2}=\angle AFD.$$
Remark: $ACGX$ being cyclic is a special case of Miquel's theorem for triangle $ADC$ and points $G$, $F$ and $C$.