
From the figure:
$0.5y = a \sin \theta$
$y = 2a \sin \theta$
$x + 0.5y = a \cos \theta$
$x = a \cos \theta - 0.5y$
$x = a \cos \theta - 0.5(2a \sin \theta)$
$x = a (\cos \theta - \sin \theta)$
Area of the rectangle:
$A = xy$
$A = [\,a (\cos \theta - \sin \theta)\,](2a \sin \theta)$
$A = 2a^2 \sin \theta (\cos \theta - \sin \theta)$
$\dfrac{dA}{d\theta} = 2a^2[ \, \sin \theta (-\sin \theta - \cos \theta) + (\cos \theta - \sin \theta)\cos \theta \, ] = 0$
$-\sin \theta (\sin \theta + \cos \theta) + \cos \theta (\cos \theta - \sin \theta) = 0$
$-\sin^2 \theta - \sin \theta \cos \theta + \cos^2 \theta - \sin \theta \cos \theta = 0$
$(\cos^2 \theta -\sin^2 \theta) - 2\sin \theta \cos \theta = 0$
$\cos 2\theta - \sin 2\theta = 0$
$\sin 2\theta = \cos 2\theta$
$\dfrac{\sin 2\theta}{\cos 2\theta} = 1$
$\tan 2\theta = 1$
$\theta = 22.5^\circ$
$A = 2a^2 \sin 22.5^\circ (\cos 22.5^\circ - \sin 22.5^\circ)$
$A = 0.4142a^2$ answer