Given a box of dimensions $l,w,h$ respectively, the surface area of the box is the sum of the surface areas of the top and bottom, given by $lw+lw =2lw$ plus the surface areas of the other 4 faces: $2lh+2wh$ , for a total of $$2lw+2lh+2wh$$. This means that the total cost of he material is $8$(# of meters in top and bottom)+ 1(material on the sides)=$$8(2lw)+1(lh+wh)= 16lw+lh+wh$$ But we must do this while satisfying the condition $lhw=8$ You can do this by Lagrange multipliers, as others pointed out, or you can substitute $lhw=8$ into the original problem and turn the problem into a problem of 2 variables, which I will do here, since others have done examples with Lagrange multipliers: $$16lw+lh+wh $$ becomes then $$ f(h,w)=\frac {128}{h}+\frac{8}{w}+hw= \frac{128w+ 8h +h^2w^2}{hw}$$
Now you have a function of 2 variables and you can use the techniques to find its maxmum and minimum values:
We start considering the partials $f_h, f_w$ and we set them equalto $0$, to find the critical points and we consider the discriminant $D$, with $$D=f_{xx}f_{yy}- f^2_{xy} $$.
And we consider the possibilities:
1)$D>0, f_{xx} <0$
2)$D>0, f_{xx}>0 $
(There are other possibilities, but let's just consider these for now ).
In the case of $1$ we get a relative maximum, in the case of $2$ we get a relative minimum.
Can you see how to do it?
EDIT: The critical points are $y= 8/x^2 , x= 128/y^2$ , so that