The volume of the rectangular prism is 36 ft³.
Step-by-step explanation:
Step 1:
The volume of a rectangular prism
,
The area of the base is length multiplied by the width. So 
The volume of a rectangular prism = 
The volume of a rectangular pyramid
Where a is the side length. If the base is a square, the area
.
So the volume of a rectangular pyramid
.
So if a rectangular pyramid and a rectangular prism have the same base and height, then
3 times the volume of the rectangular pyramid = The volume of the rectangular prism.
Step 2:
As it is given that the volume of the pyramid is 12 ft³, we can calculate the volume of the prism. As both the shapes have the same height and base,
The volume of the prism = 
The volume of the rectangular prism is 36 ft³.