Answer :

This is something called Cramer’s rule and it’s really odd, kinda fun if you just go with it! First you line up all of your equations to be in x. Y. Z. Order. So the first and third are fine, we have to work on the middle one which becomes -x+3y-z=8 ( see how it is now in x y z order?)
Then it gets weird but fun! You have to make coefficient matrix for D, Dx, Dy, and Dz
Start with D

2. -1. 0
D=. -1. 3. 1
0. 1. -2

Do you see how we grabbed to coefficient of x in column 1, y in column 2 and z in column 3. Then we need the answer column which is
1
8
5


Now you solve for D by repeating column 1 and 2 in new columns 4 and 5

2. -1. 0. 2. -1
D. -1. 3. -1. -1. 3
0. 1. -2. 0. 1

Now you do too to bottom diagonal multiplication for 3 rows and add your sums and then, bottom to top diagonal multiplication for 3 rows and subtract all of those sums to solve for D. Sounds nuts right?!?
So we start too to bottom, left to right and out first diagonal is 2•3•-2 (see it??) so that is -12
Next diagonal is -1•-1•0 so 0. The third diagonal is 0•-1•1 so 0 again. We we have -12.
Next we go bottom to top to multiply diagonals and subtract all of these from the -12.
So 0•3•0=0. 1•-1•2=-2 and -2•-1•-1=-2
So the original -12 minus O minus -2 minus -2 =-8