The box needs to be a cube so that the sides, the top, and the bottom just touch the ball. In other words, the length, width and height of the box each equal the diameter of the ball. Volume of the ball is 4(pi)r^3/3=36(pi), where r=the radius of the ball. So r^3=3*36(pi)/(4(pi))=27 and r=3cm, so the diameter is 6cm, and the cube has side 6cm.