.
1. Since the volume of the small cube is 8 cubic inches, the size of its edge is 2 inches (2^3 = 8).
Do you understand it ?
2. Since the bottom of the box is 9 inches X 4 inches, you can place 4 small cbes in one direction (2*4 = 8)
and 2 small cubes in the other direction (2*2 = 4).
So, you can place exactly 8*2 = 16 small cubes in one layer at the bottom of your box, and you can not place more into this layer.
Do you understand it ?
3. You can place all yours 24 small cubes in three such layers into the shipping box.
Do you understand it ?
4. Hence, the minimum height of the shipping box is 3 times 2 inches, which is 6 inches.
Solved.
Do you agree ?