The Cavalieri's principle states that if two solids are of equal altitude and the sections are made by planes that parallel and of the same distance from the base, then the volume of the solids are equal.
For item, we multiply the dimensions of the prism to determine the volume of each of figure,
V = l x w x h
Then, we multiply the calculated volume by the number of prism to calculate the total volume that is equal to,
V = n x l x w x h