Answer
$w=3\sqrt 2$, $h=\frac{3\sqrt 2}{2}$
Work Step by Step
Step 1. Set up a coordinate system as shown in the figure in the book with the center of the circle as the origin and the top right corner as P.
Step 2. The equation of the semicircle can be found as $y=\sqrt {3^2-x^2}, 0\leq x\leq 3$
Step 3. The point $P(\frac{w}{2},h)$ of the top right corner of the rectangle will satisfy the above equation and $h=\sqrt {9-(\frac{w}{2})^2}$
Step 4. The area of the rectangle is $A=wh=w\sqrt {9-(\frac{w}{2})^2}$. Define $B=A^2=w^2(9-(\frac{w}{2})^2)=9w^2-\frac{w^4}{4}$. Take the derivative to get $B'=18w-w^3$ and letting $B'=0$, we get $w=3\sqrt 2$ (discard the out-of-domain values), which gives $h=\sqrt {9-\frac{18}{4}}=\frac{3\sqrt 2}{2}$ and $A=wh=9unit^2$.
Step 5. Check $B''=18-3w^2|_{w=3\sqrt 2}=-36\lt0$ and we can confirm that the region is concave down with a local maximum at the above point.