Solution:
Assume the numbers are $\mathrm{x}, \mathrm{y}$ and $\mathrm{z}$.
As per the question,
$\begin{array}{l}
x+y+z=2 \\
x+2 y+z=1 \\
5 x+y+z=6
\end{array}$
Now converting the following equations in matrix form,
$\begin{array}{l}
A X=B \\
{\left[\begin{array}{lll}
1 & 1 & 1 \\
1 & 2 & 1 \\
5 & 1 & 1
\end{array}\right]\left[\begin{array}{l}
x \\
y \\
z
\end{array}\right]=\left[\begin{array}{l}
2 \\
1 \\
6
\end{array}\right]} \\
R_{2}-R_{1} \\
R_{3}-R_{1} \\
{\left[\begin{array}{lll}
1 & 1 & 1 \\
0 & 1 & 0 \\
4 & 0 & 0
\end{array}\right]\left[\begin{array}{l}
x \\
y \\
z
\end{array}\right]=\left[\begin{array}{c}
2 \\
-1 \\
5
\end{array}\right]}
\end{array}$
Again converting back into the equations we get
$\begin{array}{l}
x+y+z=2 \\
Y=-1 \\
4 x=5 \\
x=\frac{5}{4} \\
\frac{5}{4}-1+z=2 \\
Z=2-\frac{5}{4}+1 \\
Z=\frac{7}{4}
\end{array}$
$\therefore$ The numbers are $\frac{5}{4}, \frac{7}{4},-1$.