The volume of the box is:

Since the bas is a square, let one side be x and the height be h, such that:

This equals A^3;

Now, the Surface area is given by:

You have two equations now. Substitute h in the second equation and differentiate with respect to x and solve for 0, to get the value of x in those conditions (Don't forget that A^3 is a constant).

Then, substitute the value of x to get the value of h.