Step 1: Concept
Use the formula for the shortest distance between two skew lines.
Step 2: Meaning
Let
\[
\vec a=(1,-1,0),
\quad
\vec b=(2,0,1),
\]
and direction vectors
\[
\vec d_1=(0,1,2),
\quad
\vec d_2=(1,-1,1).
\]
Step 3: Analysis
Compute
\[
\vec d_1\times\vec d_2
=
\begin{vmatrix}
\hat i & \hat j & \hat k\\
0 & 1 & 2\\
1 & -1 & 1
\end{vmatrix}
=
(3,2,-1).
\]
Its magnitude is
\[
|\vec d_1\times\vec d_2|
=
\sqrt{14}.
\]
Also,
\[
\vec b-\vec a=(1,1,1).
\]
Hence
\[
|(\vec b-\vec a)\cdot(\vec d_1\times\vec d_2)|
=
|3+2-1|
=
4.
\]
Therefore,
\[
D
=
\frac{4}{\sqrt{14}}
=
\sqrt{\frac{8}{7}}.
\]
Step 4: Conclusion
Thus the shortest distance is
\[
\sqrt{\frac{8}{7}}.
\]
Final Answer: (D)