Have a look at the construction. It shows cubes beeing put into a square-based pyramid with lenght of the sides=4 cm and heigth=6 cm. Note: It's always the biggest possible cube, that you put in the pyramid.
Calculate the volume of all the cubes, if you would contiune that pattern endlessly. Use the hints, if you get stuck!