if you make the left hand bottom corner of the rectangle point a then it follows that

subing in some values gives

for a maximum you must find where

probably should discard zero as a solution at this point as it implies zero area.

now

Maximum area should be simple to find from here using