A system:
\(ax + by = c\\ dx + ey = f\)
Changing any of the equations of subject x. I would choose the first one
\(ax + by = c\\ ax = c - by\\ x = \dfrac{c-by}{a}\)
Then substitute into the second one if you chose first one, and substitute into the first one if you chose second. In this case I will sub it into second one.
\(d(\dfrac{c-by}{a})+ey = f\\ \dfrac{cd}{a}-\dfrac{bdy}{a}+ey = f\\ ey - \dfrac{bdy}{a} = f - \dfrac{cd}{a}\\ y (e-\dfrac{bd}{a}) = f - \dfrac{cd}{a}\\ y = \dfrac{e-\frac{bd}{a}}{f-\frac{cd}{a}}=\dfrac{ae-bd}{af-cd}\)
There we solved y. Then we will solve x.
\(x = \dfrac{c-by}{a} = \dfrac{c-b}{a}\cdot \dfrac{ae-bd}{af-cd}=\dfrac{ace-bcd-abe+b^2d}{a^2f-acd}\)
And this is the general formula for any equation systems in the form:
\(ax+by=c\\ dx+ey=f\)
.