Use the elimination method to solve the following system of equations.

x + 3y – z = 2
x – 2y + 3z = 7
x + 2y – 5z = –21

x + 3y – z = 2

x – 2y + 3z = 7
------------------
0x +5y -4z = -5

x – 2y + 3z = 7
x + 2y – 5z = –21
-----------------
0x -4y + 8z = 28 or -2y+4z=14

then

+5y -4z = -5
-2y +4z = 14
----------------
3 y +0z = 9

y = 3
now go back up and get x and z

To solve the given system of equations using the elimination method, we need to eliminate one variable at a time by adding or subtracting the equations.

Step 1: Eliminating the variable x
To eliminate the variable x, we'll subtract the second equation from the first equation.

(x + 3y – z) - (x – 2y + 3z) = 2 - 7
Simplifying both sides, we get:
5y - 4z = -5 (Equation 1)

Step 2: Eliminating the variable x again
Next, we will subtract the second equation from the third equation to eliminate x.

(x + 2y – 5z) - (x – 2y + 3z) = -21 - 7
Simplifying both sides, we get:
4y - 8z = -28 (Equation 2)

Now we have two equations remaining:
5y - 4z = -5 (Equation 1)
4y - 8z = -28 (Equation 2)

Step 3: Making the coefficients of y the same
To make the coefficients of y the same in both equations, we'll multiply Equation 1 by 4 and Equation 2 by 5.

20y - 16z = -20 (Equation 3)
20y - 40z = -140 (Equation 4)

Step 4: Eliminating the variable y
Now we'll subtract Equation 3 from Equation 4 to eliminate y.

(20y - 40z) - (20y - 16z) = -140 - (-20)
Simplifying both sides, we get:
-24z = -120
Dividing both sides by -24, we find:
z = 5

Step 5: Substitute the value of z into Equation 1 to find y
Using Equation 1, we substitute in the value of z:

5y - 4(5) = -5
5y - 20 = -5
Adding 20 to both sides, we get:
5y = 15
Dividing both sides by 5, we find:
y = 3

Step 6: Substitute the values of y and z into any of the original equations to find x
We can substitute the values of y and z into Equation 1:

x + 3(3) - 5 = -21
x + 9 - 5 = -21
x + 4 = -21
Subtracting 4 from both sides, we get:
x = -25

Therefore, the solution to the given system of equations is:
x = -25, y = 3, and z = 5.