Answer
The solution is, $x=t,y=t-1,z=t;t\in \mathbb{R}$.
Work Step by Step
Consider the given system of equations
$\begin{align}
& x-2y+z=2 \\
& 2x-y-z=1 \\
\end{align}$
Therefore, the system of equations can be expressed as below:
$\left[ \begin{matrix}
1 & -2 & 1 \\
2 & -1 & -1 \\
\end{matrix} \right]\left[ \begin{matrix}
x \\
y \\
z \\
\end{matrix} \right]=\left[ \begin{matrix}
2 \\
1 \\
\end{matrix} \right]$
Consider, $z=t,t\in \mathbb{R}$. So,
$\begin{align}
& \left[ \begin{matrix}
1 & -2 \\
2 & -1 \\
\end{matrix} \right]\left[ \begin{matrix}
x \\
y \\
\end{matrix} \right]+t\left[ \begin{matrix}
1 \\
-1 \\
\end{matrix} \right]=\left[ \begin{matrix}
2 \\
1 \\
\end{matrix} \right] \\
& \left[ \begin{matrix}
1 & -2 \\
2 & -1 \\
\end{matrix} \right]\left[ \begin{matrix}
x \\
y \\
\end{matrix} \right]=\left[ \begin{matrix}
2 \\
1 \\
\end{matrix} \right]-t\left[ \begin{matrix}
1 \\
-1 \\
\end{matrix} \right] \\
& \left[ \begin{matrix}
1 & -2 \\
2 & -1 \\
\end{matrix} \right]\left[ \begin{matrix}
x \\
y \\
\end{matrix} \right]=\left[ \begin{matrix}
2-t \\
1+t \\
\end{matrix} \right]
\end{align}$
Therefore, this system can be expressed as
$AX=B$
Where
$A=\left[ \begin{matrix}
1 & -2 \\
2 & -1 \\
\end{matrix} \right],B=\left[ \begin{matrix}
2-t \\
1+t \\
\end{matrix} \right],X=\left[ \begin{matrix}
x \\
y \\
\end{matrix} \right]$
Therefore, the solution of the equation is given by:
$X={{A}^{-1}}B$
Consider the determinant of the matrix
$\begin{align}
& \left| A \right|=\left| \begin{array}{*{35}{r}}
1 & -2 \\
2 & -1 \\
\end{array} \right| \\
& =-1+4 \\
& =3
\end{align}$
Consider the adjoint of the matrix
$\begin{align}
& \text{adj}\left( A \right)={{\left[ \begin{matrix}
+\left( -1 \right) & -\left( 2 \right) \\
-\left( -2 \right) & +\left( 1 \right) \\
\end{matrix} \right]}^{t}} \\
& ={{\left[ \begin{array}{*{35}{r}}
-1 & -2 \\
2 & 1 \\
\end{array} \right]}^{t}} \\
& =\left[ \begin{array}{*{35}{r}}
-1 & 2 \\
-2 & 1 \\
\end{array} \right]
\end{align}$
Therefore, the inverse of the matrix $A$ is
${{A}^{-1}}=\frac{1}{3}\left[ \begin{array}{*{35}{r}}
-1 & 2 \\
-2 & 1 \\
\end{array} \right]$
Therefore
$\begin{align}
& {{A}^{-1}}B=\frac{1}{3}\left[ \begin{array}{*{35}{r}}
-1 & 2 \\
-2 & 1 \\
\end{array} \right]\left[ \begin{matrix}
2-t \\
1+t \\
\end{matrix} \right] \\
& =\frac{1}{3}\left[ \begin{matrix}
-\left( 2-t \right)+2\left( 1+t \right) \\
-2\left( 2-t \right)+\left( 1+t \right) \\
\end{matrix} \right] \\
& =\left[ \begin{matrix}
\frac{-2+t+2+2t}{3} \\
\frac{-4+2t+1+t}{3} \\
\end{matrix} \right] \\
& =\left[ \begin{matrix}
t \\
t-1 \\
\end{matrix} \right]
\end{align}$
Therefore, the solution of the system of equations is $x=t,y=t-1,z=t$