Given lines
Line 1 : $$\vec r = 6\hat i + 2\hat j + 2\hat k + \lambda\,(\hat i - 2\hat j + 2\hat k)$$
Line 2 : $$\vec r = -4\hat i - \hat k + \mu\,(3\hat i - 2\hat j - 2\hat k)$$
Write them in standard vector form
$$\vec r = \vec a_1 + \lambda\,\vec b_1,\qquad \vec a_1 = 6\hat i + 2\hat j + 2\hat k,\; \vec b_1 = \hat i - 2\hat j + 2\hat k$$ $$\vec r = \vec a_2 + \mu\,\vec b_2,\qquad \vec a_2 = -4\hat i + 0\hat j - \hat k,\; \vec b_2 = 3\hat i - 2\hat j - 2\hat k$$
Step 1 · Check that the lines are skew
Their direction vectors are not parallel because
$$\vec b_1 = (1,-2,2),\; \vec b_2 = (3,-2,-2)$$ are not scalar multiples (easy to verify).
To see they do not intersect, solve $$\vec a_1+\lambda\vec b_1=\vec a_2+\mu\vec b_2$$ :
| $$6+\lambda$$ | $$= -4+3\mu$$ |
| $$2-2\lambda$$ | $$= -2\mu$$ |
| $$2+2\lambda$$ | $$= -1-2\mu$$ |
From the second equation $$\mu = \lambda-1$$.
Substitute in the first: $$6+\lambda = -4+3(\lambda-1) \Rightarrow 13-2\lambda =0 \Rightarrow \lambda=\tfrac{13}{2},\; \mu=\tfrac{11}{2}$$.
Check in the third: $$2+2\lambda = 15\neq -1-2\mu = -12$$, so no common point exists. Hence the lines are skew.
Step 2 · Formula for shortest distance
For skew lines $$\vec r=\vec a_1+\lambda\vec b_1$$ and $$\vec r=\vec a_2+\mu\vec b_2$$,
shortest distance d is
$$d = \frac{|(\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2)|}{|\vec b_1\times\vec b_2|}$$
Step 3 · Evaluate the cross-product
$$\vec b_1 = (1,-2,2),\; \vec b_2 = (3,-2,-2)$$
$$\vec b_1\times\vec b_2 = \begin{vmatrix}\hat i&\hat j&\hat k\\ 1&-2&2\\ 3&-2&-2\end{vmatrix}$$
$$\qquad = \hat i[(-2)(-2)-2(-2)] - \hat j[1(-2)-2(3)] + \hat k[1(-2)-(-2)(3)]$$ $$\qquad = 8\hat i + 8\hat j + 4\hat k$$
Magnitude:
$$|\vec b_1\times\vec b_2| = \sqrt{8^2+8^2+4^2}=\sqrt{64+64+16}=\sqrt{144}=12$$
Step 4 · Evaluate the scalar triple product
$$\vec a_2-\vec a_1 = (-4-6,\;0-2,\;-1-2)=(-10,-2,-3)$$
Dot product:
$$ (\vec a_2-\vec a_1)\cdot(\vec b_1\times\vec b_2) = (-10)(8)+(-2)(8)+(-3)(4) = -80-16-12 = -108$$
Step 5 · Shortest distance
$$ d = \frac{|{-108}|}{12} = \frac{108}{12}=9 $$
Therefore, the shortest distance between the given lines is $$9\text{ units}.$$