Equation of first line,
$ \frac{x-6}{1}=\frac{y-2}{2}=\frac{z-2}{2}=k\left(say\right)$
$\therefore x = k + 6, y = -2k + 2, z = 2k + 2$
Hence, general point on the first line,
$P \equiv \left(k + 6, - 2k + 2, 2k + 2\right)$
Equation of second line,
$\frac{x+4}{3}=\frac{y}{-2}=\frac{Z+1}{-2}=l\quad\left(say\right)$
$\therefore x = 3l - 4, y = -2l, z = -2l -1$
Hence, general point on the second line,
$Q \equiv \left(3l - 4, - 2l, -2l - 1\right)$
Direction ratios of PQ are
$3l - 4 - k -6, -2l + 2k -2, - 2l -1 -2k - 2$
i.e. $3l - k - 10, -2l + 2k- 2, - 2l -2k - 3$
Now |PQ| will be the shortest distance
between the two lines if PQ is perpendicular
to both the lines. Hence,
$1\left(3l - k-10\right)+ \left(-2\right)$
$\left(-2l + 2k - 2\right) + 2\left(-2l - 2k - 3\right)= 0$
and $3 \left(3l - k - 10\right) + \left(-2\right)\left(-2l+2k-2\right)+\left(-2\right)\left(-21-2k-3\right)=0$
$i.e. 3l - 9k = 12 or l - 3k = 4\quad\quad\quad ...\left(i\right)$
and $17l - 3k = 20 \quad\quad\quad\quad\quad\quad\quad\quad... \left(ii\right)$
Subtracting equation $\left(i\right)$ from$ \left(ii\right)$, we get
$161 = 16 \quad\quad\quad\quad\therefore l = 1$
Putting this value of l in equation \left(i\right), we get
$- 3k = 3, \therefore k = - 1$
$\therefore P \equiv \left(-1 + 6, - 2 \left(- 1\right) + 2, 2 \left(- 1\right) + 2\right)$
$\quad\quad\equiv \left(5, 4, 0\right)$
Similarly, $Q = \left(-1, -2, -3\right)$
Hence, shortest distance, PQ,
=$\sqrt{\left(-1-5\right)^{2}+\left(-2-4\right)^{2}+\left(-3-0\right)^{2}}$
$=\sqrt{\left(-6\right)^{2}+\left(-6\right)^{2}+\left(-3\right)^{2}}=\sqrt{36+36+9}$
=9 units