Stuck on a Geometry Problem

enter image description here

Let $H$ be the midpoint of $AC$ and $\angle EIC= 90^{\circ}$. We can observe that $$FH+3=HG+4,\quad FH+HG=x.$$ So we obtain $HG=\frac{x-1}2$. Since two corresponding angles are congruent; $\angle FEG =\angle EHG=45^{\circ}$ and $\angle EGF=\angle HGE$, we have that $\triangle FEG$ and $\triangle EHG$ are similar to each other. This gives $$FG:EG=EG:HG\implies EG^2 = FG\cdot HG=\frac{x(x-1)}2.$$ Now, note that $EI=\frac14 AC=\frac{x+7}4$ and $IG=IH-GH=\frac{x+7}{4}-\frac{x-1}2=\frac{9-x}{4}$. Since $\triangle EIG$ is a right triangle, by Pythagorean theorem, we find that $$ EG^2=\frac{x(x-1)}{2}=EI^2+IG^2=\frac{(x+7)^2}{16}+\frac{(9-x)^2}{16}, $$ which implies $x=5 $ or $x=-\frac{13}3$. Since $x>0$, we get $x=5$.


Let $O$ be a midpoint of a segment $AC$.

Rotate $F$ for $90^{\circ}$ around $E$ to a new point $H$. This rotation takes $O$ to $C$.

Then $EF=EH$ and $\angle FEH = 90^{\circ}$ so $EG$ is angle bisector for $\angle FEH$ so $GH = GF = x$.

It is easy to see that $$CH = FO = {x+1\over 2}$$

Now $FHCE$ is cyclic quadrilateral since $\angle CFE = \angle CHE$ so $$\angle FCH = \angle FEH =90^{\circ}$$

Finaly we use Pythagoras theorem in triangle $\triangle CGH$:

$$ x^2 = 4^2+\Big({x+1\over 2}\Big)^2 \implies x=5$$

enter image description here


Following solution uses no concept of concyclic or similar triangles, only rotation and Pythagoras theorem.

Let $O$ be a midpoint of a segment $AC$.

Rotate $G$ for $-90^{\circ}$ around $E$ to a new point $K$. This rotation takes $C$ to $O$ and $O$ to $B$, so $K$ is on a segment $BO$ (which is a part of diagonal $BD$)

Then $EK=EG$ so $E$ is on perpendicular bisector of $KG$. Since $\angle KEF = \angle FEG = 45^{\circ}$ line $EG$ is perpendicular bisector for $KG$ so $FK = FG = x$.

Since $ FO = {x+1\over 2}$ we can use Pythagoras theorem in triangle $\triangle FOK$:

$$ x^2 = 4^2+\Big({x+1\over 2}\Big)^2 \implies x=5$$

enter image description here