Give names to the unknows in the problem. In this case let the length of the side to be fenced be feet, and the other side length be feet.

Now express the conditions in the problem in terms of thse unknowns:

Area is sq ft, so:

Cost (which is to be minimised):

now use to eliminate one of the variables form leaving you with a function of one variable to be minimised.

CB