Answer
$a=-2$, ${\ \ }$ $b=2$.
Work Step by Step
We have the two lines parametrized by ${{\bf{r}}_1}\left( t \right) = \left( {1,2,1} \right) + t\left( {1, - 1,1} \right)$ and ${{\bf{r}}_2}\left( t \right) = \left( {3, - 1,1} \right) + t\left( {a,b, - 2} \right)$.
From these parametrizations we have the direction vectors ${{\bf{v}}_1} = \left( {1, - 1,1} \right)$ and ${{\bf{v}}_2} = \left( {a,b, - 2} \right)$ of ${{\bf{r}}_1}$ and ${{\bf{r}}_2}$, respectively.
The two lines are parallel if and only if there exists a scalar $\lambda$ such that ${{\bf{v}}_2} = \lambda {{\bf{v}}_1}$. So,
$\left( {a,b, - 2} \right) = \lambda \left( {1, - 1,1} \right)$
$\left( {a,b, - 2} \right) = \left( {\lambda , - \lambda ,\lambda } \right)$
Solving this equation we obtain $\lambda = - 2$, $a=-2$, $b=2$.