Gauss, Gauss-Jordan.
show your progress.
Easier to just do it with a matrix I think, Gaussian equations are an unnecessary waste of time IMO.
(-5 2 1)( X) = (-5)
(1 -4 1)( Y) (1)
(1 1 -1)(Z) (2)
Sorry for the messy brackets there, not sure how to setup a matrix on the forums here.
Anyways those are your original values input into a matrix, now what you have to do is find the inverse of(Using a calculator):
(-5 2 1)
(1 -4 1)
(1 1 -1)
Which will give you the identity matrix:
(1 0 0)
(0 1 0)
(0 0 1)
Therefore on the left side you will be left with:
(1 0 0)(X)
(0 1 0)(Y)
(0 0 1)(Z)
Just remove the identity matrix from your final answer.
Now what you have to do is multiply the inverse for(Obviously your 3x3 matrix has to be in front of the other):
(-5 2 1)
(1 -4 1)
(1 1 -1)
By:
(-5)
(1)
(2)
Which will answer your problem.