Let us take the 2nd equation.
x + 2z = 4
x = 4 - 2z
Let us substitute this value of x in equation 1.
5x + 2y + z = 4
5(4-2z) + 2y + z = 4
20 - 10z + 2y + z = 4
2y - 9z + 20 = 4
2y = 9z - 16
y = (9z - 16)/2
Let us substitute this value of y, as well as that of x that we used earlier, in the third equation.
2x + y - z = -1
2(4-2z) + (9z-16)/2 + z = -1
8 - 4z + (9z/2) - 8 + z = -1
Let us multiply both sides of this equation by 2.
16 - 8z + 9z - 16 + 2z = -2
3z = -2
z = [tex]\frac{-2}{3}[/tex]
x = 4 - 2z
= 4 + [tex]\frac{4}{3}[/tex]
= [tex]\frac{16}{3}[/tex]
y = (9z-16)/2
= ([tex]\frac{-18}{3}[/tex] - 16)/2
= ( [tex]\frac{-66}{3}[/tex])/2
= -22/2
= -11
Therefore, x = [tex]\frac{16}{3}[/tex], y = -11, and z = [tex]\frac{-2}{3}[/tex].