A farmer has 160 ft of fencing to enclose 2 adjacent rectangular pig pens. What dimensions should be used so that the enclosed area will be a maximum? (give the answer as the dimensions of 1 of the pens)

First I drew the two rectangles and I knew that I had to maximize the area.

Then I got stuck. Thanks for any help!