So if u were to use a calculator, which you probably might need, you would take the radius, square it by 3, multiply by 4 and then divide by 3.
A rectangular prism is a cuboid so volume of cuboid is base area x height which is 5x5x12=300
volume of pyramid is 1/3 x base area x height = 5x5x6x1/3=50 thus volume outside pyramid and inside cuboid is 300-50=250