Answer
The system can be solved by using Cramer's Rule:
$x_1=1$ and $x_2=2$
Work Step by Step
The coefficient matrix is
$A=\left[\begin {array}{cc}
1&2\\
-1&1
\end{array}\right]$
and $|A|=1+2=3 \neq0 $. Then $ A$ is a nonsingular matrix such that
$AX=B$, where $X=\left[\begin {array}{c}
x_1\\
x_2
\end{array}\right]$ and
$B=\left[\begin {array}{c}
5\\
1
\end{array}\right]$
since $A$ is a nonsingular matrix, then we can use Cramer's Rule to solve the linear system. Thus, the linear system has the unique solution
$x_1=|A_1|/|A|$ and $x_2=|A_2|/|A|$
where $A_1=\left[\begin {array}{c}
5&2\\
1&1
\end{array}\right]$
$A_2=\left[\begin {array}{c}
1&5\\
-1&1
\end{array}\right]$
and then $|A_1|=3 $ and $|A_2|=6$
therefore, $x_1=|A_1|/|A|=3/3=1$ and $x_2=|A_2|/|A|=6/3=2$