If $(x,y)$ is the coordinate of the upper right corner of the rectangle, with the origin at the center of the circles (inner radius $r_1$, outer radius $r_2$), then the area of the rectangle is $A=2x(y-r_1)$. Eliminate $y=\sqrt{r_2^2-x^2}$, differentiate $dA/dx$ and solve $dA/dx=0$ for $x$. This gives the maximal area as $$A_{\rm max}=\frac{1}{4} \sqrt{-r_1^2-\sqrt{r_1^4+8 r_1^2 r_2^2}+4 r_2^2} \left(\sqrt{r_1^2+\sqrt{r_1^4+8 r_1^2 r_2^2}+4 r_2^2}-2 \sqrt{2} r_1\right).$$