Given two skew lines:
\[
\vec{r}_1 = (2\hat{i} - \hat{j}) + t(\hat{i} + 2\hat{k})
\]
\[
\vec{r}_2 = (-2\hat{i} + \hat{k}) + s(\hat{i} - \hat{j} - \hat{k})
\]
Find the shortest distance between them.
Step 1: Identify direction vectors and points on each line:
\[
\vec{d}_1 = \hat{i} + 0\hat{j} + 2\hat{k} = (1, 0, 2)
\]
\[
\vec{d}_2 = \hat{i} - \hat{j} - \hat{k} = (1, -1, -1)
\]
Points on lines:
\[
\vec{A} = (2, -1, 0), \quad \vec{B} = (-2, 0, 1)
\]
Step 2: The shortest distance \( D \) between skew lines is given by:
\[
D = \frac{|(\vec{B} - \vec{A}) \cdot (\vec{d}_1 \times \vec{d}_2)|}{|\vec{d}_1 \times \vec{d}_2|}
\]
Step 3: Calculate \( \vec{B} - \vec{A} \):
\[
\vec{B} - \vec{A} = (-2 - 2, 0 - (-1), 1 - 0) = (-4, 1, 1)
\]
Step 4: Calculate cross product \( \vec{d}_1 \times \vec{d}_2 \):
\[
\vec{d}_1 \times \vec{d}_2 = \begin{vmatrix}
\hat{i} & \hat{j} & \hat{k} \\
1 & 0 & 2 \\
1 & -1 & -1 \\
\end{vmatrix}
= \hat{i}(0 \times -1 - 2 \times -1) - \hat{j}(1 \times -1 - 2 \times 1) + \hat{k}(1 \times -1 - 0 \times 1)
\]
\[
= \hat{i}(0 + 2) - \hat{j}(-1 - 2) + \hat{k}(-1 - 0) = 2 \hat{i} + 3 \hat{j} - \hat{k} = (2, 3, -1)
\]
Step 5: Calculate numerator \( |(\vec{B} - \vec{A}) \cdot (\vec{d}_1 \times \vec{d}_2)| \):
\[
(-4, 1, 1) \cdot (2, 3, -1) = (-4)(2) + (1)(3) + (1)(-1) = -8 + 3 - 1 = -6
\]
Absolute value:
\[
| -6 | = 6
\]
Step 6: Calculate denominator \( |\vec{d}_1 \times \vec{d}_2| \):
\[
\sqrt{2^2 + 3^2 + (-1)^2} = \sqrt{4 + 9 + 1} = \sqrt{14}
\]
Step 7: Shortest distance:
\[
D = \frac{6}{\sqrt{14}} = \frac{3 \times 2}{\sqrt{14}} = \frac{3 \sqrt{2}}{\sqrt{7}}
\]
(since \( \sqrt{14} = \sqrt{7 \times 2} = \sqrt{7} \sqrt{2} \), divide numerator and denominator by \( \sqrt{2} \))
Therefore,
\[
\boxed{\frac{3 \sqrt{2}}{\sqrt{7}}}
\]