34. It is required to take a rectangular frame in a horizontal position along a corridor bounded by vertical walls of which a horizontal cross-section is two concentric semicircles of radii $r$ and $r\ \sqrt{3}$; the frame is of length $2x$ and breadth $y$. One side of length $2x$ is tangential to the inner wall, and the two ends of the opposite side are in contact with the outer wall, as shown in Fig. Misc. Ex. 1-34. Prove that
$$x^{2} = 2r^{2} - 2ry - y^{2}.$$
Prove that, if $x$ and $y$ may vary, the greatest possible area enclosed by the frame is $\frac{1}{2}r^{2}\ \sqrt{3}.$
I noticed a few things that I believe are relevant. The first is that one of the sides of the rectangle is a chord of the larger circle and the second is that the angle between the radius of the smaller circle and the opposite side of rectangle is 90 degrees.
It's been a long time since I had fun with circles, but using Wolfram MathWorld I was able to piece together this much:

$2x = 2r\sqrt{3}\sin\left(\dfrac{\theta}{2}\right) \Leftrightarrow x = r\sqrt{3}\sin\left(\dfrac{\theta}{2}\right)$
$h = r\sqrt{3} - (y + r) \Leftrightarrow y = r\sqrt{3} - r - h$
$y + r = r\sqrt{3}\cos\left(\dfrac{\theta}{2}\right) \Leftrightarrow y = r\sqrt{3}\cos\left(\dfrac{\theta}{2}\right) - r$
$x^{2} = 3r^{2}\sin^{2}\left(\dfrac{\theta}{2}\right)$
$y^{2} = 3r^{2}\cos^{2}\left(\dfrac{\theta}{2}\right) - 2r^{2}\sqrt{3}\cos\left(\dfrac{\theta}{2}\right) + r^{2}$
But that's about everything of use - does anybody have any hints?
Edit to incorporate the suggestion of André Nicolas:
May we form a triangle as shown in dashed pink and so derive $y = \sqrt{3r^{2} - x^{2}} - r$


A start: By the Pythagorean Theorem we have $y=\sqrt{3r^2-x^2}-r$, which can be rewritten as $y+r=\sqrt{3r^2-x^2}$. Square both sides and simplify.
For the area maximization, equivalently maximize $x^2y^2$, that is, $2r^2y^2-2ry^3-y^4$.