Volume = (1/3) * π * r² * h.
= (1/3) * π * 3² * 4.5.
= (1/3) * 127.23450247
= 42.41115 cm^3
For the cylinder on the left-hand-side,

now, for the triangular prism on the right-hand-side,
notice is really just 2 triangles and 3 rectangles, stacked up to each other at the edges.
the triangles have a base of 4, and a height of 1.5.
the rectangle on the left and the one on the right is a 6x2.5 rectangle.
the rectangle at the bottom, is a 4x6 rectangle.
adding their areas, is the area of the prism,
4x(2x-1)(x-3) is the simplification