The box on the top left would be filled with -2x³; top right would be filled with 5x²; second left would be filled with 6x²; second right would be filled with -15x; bottom left would be filled with -8x; and bottom right would be filled with 20.
The volume of a cube formula is v(s)=s^3. If you plug in 3 for s, you will find that v(s) would in fact equal 27. Thus the length of the sides are 3 and the volume is 27.