[tex]\bf \textit{volume of a rectangular prism}\\\\
V=lwh\qquad
\begin{cases}
l=x+2\\
w=3\\
V=3x^2 + 18x+ 24
\end{cases}\implies \cfrac{V}{lw}=h
\\\\\\
\cfrac{3x^2 + 18x+ 24}{3(x+2)}=h\implies \cfrac{\underline{3}(x^2 + 6x+ 8)}{\underline{3}(x+2)}=h
\\\\\\
\cfrac{(x+4)\underline{(x+2)}}{\underline{(x+2)}}=h\implies x+4=h[/tex]