[ Mathematics ] Open Question : Applications of minima and maxima?

A rectangular field is to be fenced, one side of which is the edge of a straight river. It is given that the material for the two opposite sides costs P30.00 per meter and the material for the side opposite the river costs P60.00 per meter. If an amount of P6000 is available, what should be the dimensions to be enclose a maximum area?