Stuck on a Geometry Problem 
$ABCD$ is a square, $E$ is a midpoint of side $BC$, points $F$ and $G$ are on the diagonal $AC$ so that $|AF|=3\ \text{cm}$, $|GC|=4\ \text{cm}$ and $\angle{FEG}=45 ^{\circ}$.  Determine the length of the segment $FG$.

How can I approach this problem, preferably without trigonometry?


Calling 
$$
AF = a\\
FG=x\\
GC = b\\
EC = c\\
E = (X_0, Y_0)\\
O = \left(a+\frac x2, \frac x2\right)
$$
Considering in the plane $X\times Y$ the square diagonal as the $X$ axis with $A$ at the origin, we have
$$
\frac{\sqrt 2}{2}(a+x+b)= 2c\\
x = \sqrt2 r\\
\left(X_0-\left(a+\frac x2\right)\right)^2+\left(Y_0-\frac x2\right)^2= r^2\\
X_0 = a+x+b -\frac{\sqrt 2}{2}c\\
Y_0 = \frac{\sqrt 2}{2}c
$$
Here $r$ represents the radius for the circle which intersects the $X$ axis at $F, G$ such that $\angle FEG = \frac{\pi}{4}$ is the angle subtended by arc $AB$
Solving for $x,r,X_0,Y_0$ we get at
$$
\left\{
\begin{array}{rcl}
 x& =& \frac{1}{3} \left(b-a+2 \sqrt{a^2-2 b a+4 b^2}\right) \\
 c& =& \frac{a+2 b+\sqrt{a^2-2 b a+4 b^2}}{3 \sqrt{2}} \\
 r& =& \frac{b-a+2 \sqrt{a^2-2 b a+4 b^2}}{3 \sqrt{2}} \\
 X_0&=&\frac{1}{2} \left(a+2 b+\sqrt{a^2-2 b a+4 b^2}\right) \\
 Y_0&=&\frac{1}{6} \left(a+2 b+\sqrt{a^2-2 b a+4 b^2}\right) \\
\end{array}
\right.
$$
giving after substitution $x = 5$

