Answer
The dimensions of the box will be $5 \times 5 \times 5 \ cm^3$.
Work Step by Step
We have: $hx^2=125 \implies h=\dfrac{125}{x^2}$
Next, $S(x)=2x^2+4xh=2x^2+4x \times \dfrac{125}{x^2}=2x^2+ \dfrac{500}{x}$
For maximum surface area, we must have $\dfrac{dS}{dx}=0$
or, $4x-\dfrac{500}{x^2}=0$
or, $x=5 \ cm$
,and, $h=\dfrac{125}{5}=5 \ cm$
Thus, the dimensions of the box will be $5 \times 5 \times 5 \ cm^3$.