And if you want to solve a general linear simultaneous equation: (That's what we do in 8th grade...... :) )
ax + by = c --- (1)
dx + ey = f --- (2)
(1) implies that:
y = (c - ax)/b --- (3)
Substitute (3) into (2):
dx + (ec - aex)/b = f
dx + ec/b - aex/b = f
dx - aex/b = f - ec/b <---- from now on I have to use LaTeX.... Too complicated to type like that....
\(x(d - \dfrac{ae}{b})=f - \dfrac{ce}{b}\\ x = \dfrac{f - \frac{ce}{b}}{d - \frac{ae}{b}} = \dfrac{bf-ce}{bd-ae}\)
That's the general solution for x. Now let's work that out for y.
(1) implies that
\(x = \dfrac{c-by}{a}\) --- (4)
Substitute (4) into (2):
\(\dfrac{dc-bdy}{a}+ey = f\\ \dfrac{dc}{a}-y\cdot \dfrac{bd}{a} + ey = f\\ y(e-\dfrac{bd}{a})=f-\dfrac{cd}{a}\\ y = \dfrac{f-\frac{cd}{a}}{e-\frac{bd}{a}}=\dfrac{af-cd}{ae-bd}\)
Next time you see a simultaneous equation, plug those values in, done!!