Alright let's start by noting that due to it having a square bottom and top the Length is equal to the Width. They gave us the surface area, but what we need is the length/width of the square top/bottom. So let's take the surface area and make it equal to the equation for the surface area of a rectangular prism (our shape):
192cm^2 = 2(lw + lh + hw)
Let's replace all the "l's" with w's (we can do this due to the fact that the length (l) equals the width (w) (l = w))
192cm^2 = 2(w*w + wh + hw)
192cm^2 = 2(w^2 + 2wh)
We know what the height (h) is as it is given in the problem (5cm).
192cm^2 = 2(w^2 + 2*5w)
192cm^2 = 2(w^2 + 10w)
Divide 2 on both sides.
96cm^2 = w^2 + 10w
Subtract 96 on both sides.
0 = w^2 + 10w - 96
Factor it out.
0 = (w - __)(w + ___)
0 = (w - 6)(w+16)
We have two possible answers of:
w = 6
w = -16
The only answer which makes sense is the positive one, because a box in real life can't have negative length.
So,
w = 6 cm.