I always find drawing it first to get better idea of the problem is a good start.
Make the length of the rectangle 2x. Look at the attached picture and you can see the length from centre of rectangle to top corner is the radius; 4. The length from centre to bottom corner is x. So height of rectangle will be (using pythagoras).
Area of rectangle is
differentiate that and solve for x to get the answer. You should get two answers, one of which will be zero and so obviously not the max answer!
hint: To make it easier I'd square both sides: