Let the length be
Let the height be
Then the volume is: ---------> this is our constraint equation. solve for one of the variables and plug it into your objective equation (below).
We want to minimize cost, thus the cost equation is our objective.
now simplify and minimize this function