Sorry for asking so many questions (trying to finish off my Methods holiday homework!) but there's another question I'm confused with:
Consider the system of equations and state the values of 'a' for which there is a unique solution:
1. x + 2y - z = 2
2. 2x + 5y - (a +2)z = 3
3. -x + (a - 5)y + z = 1
Context - There was a question before this one asking you to find x, y and z in terms of 'a' which I did (and checked with the solutions so they're correct):

,

and

(btw this is unrelated to the q but how do you put all the fractions on the same line using LaTeX instead of them being on different lines?).
The solutions are all real numbers except a=3 and a=0. To my understanding, you equate the gradients of the lines to each other and also the y-intercept, and then exclude the resulting values to remove the cases where the lines are parallel and when they are the same. How do you do this with three simultaneous equations?
So far, I've figured out the solution a=3 (but I'm not sure I used the right method) - I equated the gradient of the third equation to the gradient of the first equation, and got a=3, but tried using this same method for the other lines, however I didn't get a=0 and got different answers.
Thank you so much in advance and sorry this is so long!