Finding lengths when circles and squares tangents. 
Should one approach by coordinates or by euclidean geometry?
By pure geometry, I am not able to solve.
 A: Assume the larger radius is 1 first (the square's side is 2). Then the smaller radius $r=FB$ satisfies
$$\sqrt{(1+r)^2-1}+r=2$$
from which we solve and obtain $r=\frac23$.
Setting up coordinates such that $A$ is the origin, we find $G=(3/2,1/2),GB=\sqrt2/2$ and $x=\frac{2\sqrt2}3$. Since $GB=3$ in the picture, scaling yields the desired $x$ of
$$\frac{3\cdot2\sqrt2/3}{\sqrt2/2}=4$$
A: 
As we see in the above diagram, $ABCD$ is a square and two semi circles with its center $E$ and $F$ respectively. Let place the point $Q$ in such that $\triangle QEF$ is a right angled triangle and draw two altitude lines $MH$ and $GL$ from two vertices $H$ and $G$ respectively.
Again, denote the side of the sqaure = $x$ and the radius of small semi circle = $r'$. So, the radius of larger semi circle = $r = \frac{x}{2}$.
From $\triangle QEF$, we get
$EQ^2 + QF^2 = EF^2$
$(x-r')^2 + (\frac{x}{2})^2 = (\frac{x}{2} + r')^2$
$x^2 -2xr' +r'^2 + \frac{x^2}{4} = \frac{x^2}{4} + xr' + r'^2 \implies x^2 = 3xr' \implies x = 3r'$
Hence, $r' = \frac{x}{3} \implies r' = \frac{2r}{3}$
$BD$ is the diagonal of the square $ABCD$ and $\angle CBD = \angle LBG = 45^\circ$. So, here we get that $\triangle GLB$ is an isosceles triangle. 
Now, by the pythagorian theorem from $\triangle GLB$,
$GL^2 + LB^2 = GB^2 \implies GL^2 + GL^2 = 3^2 \implies 2GL^2 = 9 \implies GL = \frac{3}{\sqrt2}$
Next, $\triangle CFB \sim \triangle CGL$ and from both tne triangle it can be written that
$\frac{BC}{BF} = \frac{x}{y} = \frac{3y}{y} = 3$
and similarly,
$\frac{CL}{GL} = 3 \implies CL = 3 × \frac{3}{\sqrt2} \implies CL = \frac{9}{\sqrt2}$ 
From that, $CB = CL + LB = CL + GL = \frac{9}{\sqrt2} + \frac{3}{\sqrt2} = \frac{12}{\sqrt2} = 6\sqrt2$. So, the side of the square $ABCD$ = $x$ = $6\sqrt2$
After that,$\triangle CDE \sim \triangle HME$ and \triangle BAD \sim \triangle HMD$. From the similarity of first two triangles, we get
$\frac{CD}{HM} = \frac{DE}{ME}$
Likewise from the next similarity,
$\frac{AB}{HM} = \frac{AD}{MD} \implies \frac{CD}{HM} = \frac{CD}{MD}$.
So, we can write that
$\frac{DE}{ME} = \frac{CD}{MD}$
$\frac{r}{a} = \frac{2r}{r-a}$......(By denoting $ME = a$)
$2ra = r^2-ra \implies 6\sqrt2x = (3\sqrt2)^2 -3\sqrt2x \implies 6\sqrt2x = 18 - 3\sqrt2x = 9\sqrt2x = 18 \implies x = \frac{18}{9\sqrt2} \implies x = \sqrt2$
Then, $DM= 3\sqrt2 - a = 3\sqrt2 - \sqrt2 = 2\sqrt2$
Notice that, $\triangle DMH$ is an isosceles triangle and so, 
$DH^2 = 2DM^2 = 2(2\sqrt2)^2 = 2×8 = 16$
And finally, we get $DH = \sqrt16 = 4$. 
It could have been solved by any easier effort. But I made it very difficult. I hope that you will understand or if you have any problem, please let me know.
