dimensions of a animal pen

I tried using the second derivative and setting it equal to zero. Then plugging that number into 60 = LW (A = LW) to find the other side. I then put those numbers into the perimeter formula P = 3w + L. For some reason I keeping getting it wrong. What should I be doing instead?

A prize winning animal is going to be shown at the State Fair. A pen must be constructed to hold the animal. The rectangular pen will have three wooden sides, which cost 20 dollars per foot to construct. The front of the pen will be made of a special reinforced glass, which costs 50 dollars per foot to construct.

The animal requires an area of 60 square feet in order to be comfortable.

A) If the pen is to be built as cheaply as

possible, what are the dimensions of the pen that should be built?

L = ?

W = ?

B) How much will the pen cost to build?

$_________________