The formula to find the volume of a triangular prism is the following:
where:
h - height
b - base length
w - width
for this problem:
h = 8 cm
b = 5 cm
w = 7 cm
then
solving this, we obtain that the volume of the triangular prism is 140 cm^3 or cubic centimeters