Hope you know that formula for volume of a cube is area of base time height and volume of a square pyramid is area of base time height divide 3 - so in this your exercise case we know that area of cube is 36 cm^3 what is area of base time height - so this mean that the volume of a square pyramide what can fit perfectly inside the cube will be equal 36/3 = 12 cm^3