B - Add the volumes of a rectangular prism and a pyramid
If you look at the diagram, you can see it is a pyramid roof on top of a cuboid room.
The cuboid is a rectangular prism as it has the same cross section throughout its length. The top part however does not and so it is a pyramid not a triangular prism.
Therefore to get the volume of the whole thing, you just add the volumes of the 2 parts together.