We are given three set of system equations with three unknowns
3x + 2y + z = 8 --------- equation 1
x + y + 2z = 4------------- equation 2
4x + y + z = 7 ------------- equation 3
Firstly, we need to eliminate a single variable, so that we can solve the remiaining equations simultaneously
Let us eliminate z in equation 1 and 2
3x + 2y + z = 8
x + 2y + 2z = 4
To eliminate z, multiply equation 1 by 2 and equation 2 by 1
3x *2 + 2y * 2 + 2*z = 8*2
x*1 + 2y*1 + 2z*1 = 4*1
6x + 4y + 2z = 16
x + 2y +2z = 4
Substract the last equation from the first equation
6x - x + 4y - 2y + 2z -2z = 16 - 4
5x + 2y + 0 = 12
5x + 2y = 12 ------- equation 4
Secondly, combine equation 1 and 3 together
3x + 2y + z = 8
4x + y + z = 7
Substract the last equation from the first equation
3x - 4x + 2y - y + z - z = 8 - 7
-x + y + 0 = 1
-x + y = 1 ---------- equation 5
Solve equation 4 and 5 simultaneously
5x + 2y = 12
-x + y = 1
Let us eliminate y first
To eliminate y, multiply equation 1 by 1 and equation2 by 2
5x * 1 + 2y *1 = 12*1
-2x + 2 *y = 1 *2
5x + 2y = 12----------- 6
-2x + 2y = 2 ----------- 7
Substract equation 7 from 6
5x - (-2x) + 2y - 2y = 12 - 2
5x + 2x + 0 = 10
7x + 0 = 10
7x = 10
Divide both sides by 7
7x /7 = 10/7
x = 10/7
To find y, substitute the value of x into equation 6
-x + y = 1
-10/7 + y = 1
Make y the subject of the formula
y = 1 + 10/7
y = 7 x 1/1 + 7 x 10/7 / 7
y = 7 + 10/7
y = 17/7
To find z, substitute the values of x and y into equation 2
X + y + 2z = 4
10/7 + 17/7 + 2z = 4
= 10/7 + 17/7
= 27/7
27/7 + 2z = 4
Collect the like terms
2z = 4 - 27/7
2z = 4 * 7 /1 - 27 *7/7 / 7
2z = 28 - 27 / 7
2z = 1/7
Divide both sides by 2
2z/2 = 1/7 /2
z = 1/14
The solution of the equations are
x = 10/7, y = 17/7 and z = 1/14