I have a problem that I have solution to but not the proof. Can anyone help?

The problem is this:

A window, shaped as a rectangle with a semicircle on top, has a perimeter of 5m. The semicircle has a radius r and the rectangle has sides which are effectively 2r x h (height) what value of r gives the maximum light (area).

Simple question I know, but have problems with the details.