So we are asked to find the volume of the largest square prism that can fit inside a cube of given dimensions. One thing we have to remember that if given the volume of the cube we can easily get its dimensions.
Next, we have to know that the volume of the pyramid is 1/3 of that of a rectangular prism. With this you should get 9.