# How do you solve x+2y+z=34, x+2y+2z=38, 2x+y+3z=54?

Jul 2, 2016

$x = 18 , y = 6 , z = 4$

#### Explanation:

$\textcolor{g r e e n}{\text{Three given equations are}}$

$x + 2 y + z = 34. \ldots \ldots \left(1\right)$,

$x + 2 y + 2 z = 38. \ldots \ldots \left(2\right)$,

$2 x + y + 3 z = 54. \ldots . . \left(3\right)$

$\textcolor{b l u e}{\text{Subtracting (1) from(2) we have}}$

$x + 2 y + 2 z - \left(x + 2 y + z\right) = 38 - 34$

$\implies \cancel{x} + \cancel{2 y} + 2 z - \cancel{x} - \cancel{2 y} - z = 4$

$\implies z = 4$

$\textcolor{b l u e}{\text{Inserting the value of z in (1)}}$

$x + 2 y + 4 = 34$,

$x + 2 y = 30. \ldots . \left(4\right)$

$\textcolor{b l u e}{\text{Inserting the value of z in (3)}}$

$2 x + y + 3 \times 4 = 54$

$2 x + y = 42. \ldots \ldots \left(5\right)$

$\textcolor{b l u e}{\text{Multiplying (4) by 2 and subtracting the resulting equation from (5)}}$

$2 x + y - 2 \times \left(x + 2 y\right) = 42 - 2 \times 30$

$\implies 2 x + y - 2 x - 4 y = 42 - 60$

$\implies - 3 y = - 18$

$\implies y = 6$

color(blue)("Inserting the value of y in (4) "

$x + 2 \times 6 = 30$

$\implies x = 18$