Recall that the area of a prism is given by:

The base area of the triangular prism is given by:

Since the height of the triangular prism is 6 cm, it follows that:

Therefore, the Volume of the Triangular Prism is 126 cm³
The base area of the rectangular prism is given by:

Therefore, the volume of the rectangular prism is given by:

Therefore, the Volume of the Rectangular Prism is 336 cm³
Therefore, the Volume of the Composite is given by:

Hence, the volume of the composite figure is 462 cm³