One way to solve simultaneous equations is to reduce the number of variables to one in stages, so that what’s left is one equation with only one variable. So solve that equation and substitute the solution into the remaining equation(s). We now have one fewer variables than we had initially, so we repeat the process, reducing the variables by one each time, until we end up with one equation and one variable that can be solved.
To reduce the number of variables by one, we need to choose one variable and then rewrite the system of equations in terms of that one variable. We then get one fewer equations than we had initially.
Here’s an example with three variables x, y, z and 3 constants a, b, c.
(1) x+y-z=a, (2) x-y+z=b, (3) -x+y+z=c
From (1), z=x+y-a and from (2) z=b-x+y, so x+y-a=b-x+y, 2x=a+b, and x=(a+b)/2.
Now substitute for x:
(4) (a+b)/2+y-z=a (5) (a+b)/2-y+z=b, (6) -(a+b)/2+y+z=c.
From (4), y=a+z-(a+b)/2, from (6), y=(a+b)/2-z+c, so a+z-(a+b)/2=(a+b)/2-z+c, and 2z=a+b+c-a=b+c, so z=(b+c)/2.
Finally substituting for x and z,
y=a+z-x=a+(b+c)/2-(a+b)/2=(2a+b+c-a-b)/2=(c+a)/2.
So the solution is x=(a+b)/2, y=(a+c)/2, z=(b+c)/2.
We can put numbers for a, b, c: a=0, b=2, c=4, then x=1, y=2 and z=3. The original system would be:
x+y-z=0, x-y+z=2, -x+y+z=4.
There are other ways to solve systems of equations. I just presented one method. With only a pair of simultaneous equations, the solution is easier, but the same method works.