First create an equation for the area in terms of width and height.

Find an equation of perimeter (2x width + 2x height).

Isolate for one variable...it should be a parabola. Then if you are in calculus take the derivative and solve for 0. If not find the midpoint with -b/2a.