Factor $162=9^{2}\times 2$. Rewrite the square root of the product $\sqrt{9^{2}\times 2}$ as the product of square roots $\sqrt{9^{2}}\sqrt{2}$. Take the square root of $9^{2}$.
$$\frac{2\times 9\sqrt{2}}{\sqrt{18}}$$
Multiply $2$ and $9$ to get $18$.
$$\frac{18\sqrt{2}}{\sqrt{18}}$$
Factor $18=3^{2}\times 2$. Rewrite the square root of the product $\sqrt{3^{2}\times 2}$ as the product of square roots $\sqrt{3^{2}}\sqrt{2}$. Take the square root of $3^{2}$.
$$\frac{18\sqrt{2}}{3\sqrt{2}}$$
Cancel out $3\sqrt{2}$ in both numerator and denominator.