By definition, you know that the volume of a rectangular prism is given by the formula

So, you can make a drawing to understand the procedure easier
Then you have
![\begin{gathered} V=l\cdot w\cdot h \\ 162=l\cdot(l)/(2)\cdot3w \\ 162=l\cdot(l)/(2)\cdot3((l)/(2)) \\ 162=l\cdot(l)/(2)\cdot(3l)/(2) \\ 162=(3l^3)/(4) \\ \text{ Multiply both sides of the equation by }4 \\ 162\cdot4=(3l^3)/(4)\cdot4 \\ 648=3l^3 \\ \text{ Divide both sides of the equation by 3} \\ (648)/(3)=(3l^3)/(3) \\ 216=l^3 \\ \text{ Apply cube root to both sides of the equation} \\ \sqrt[3]{216}=\sqrt[3]{l^3} \\ 6=l \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/k3qm197zhy8fbwcoi5vgv67dv1b4dluxee.png)
And so, for the other dimensions, you get


Therefore, the dimensions of the rectangular prism are 6 meters in length, 3 meters in width, and 9 meters height.