Let h denote the height of the box. Then the volume of the box is:

The surface area of the box exists of 1 square and 4 congruent rectangles:

Plug in the term for h from the first equation to eliminate h:

To calculate the extreme amount of material use the first derivation of A:

. Solve the equation for x. For your confirmation only: