The volume of a rectangular prism is given by:

We know that the volume is 72 cub cm, the width is 2 cm and the height is 4 cm. Plugging this value in the equation we have:

Solving the equation for l we have:

Therefore the lenght of the prism is 9 cm.