A system:
ax+by=cdx+ey=f
Changing any of the equations of subject x. I would choose the first one
ax+by=cax=c−byx=c−bya
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(c−bya)+ey=fcda−bdya+ey=fey−bdya=f−cday(e−bda)=f−cday=e−bdaf−cda=ae−bdaf−cd
There we solved y. Then we will solve x.
x=c−bya=c−ba⋅ae−bdaf−cd=ace−bcd−abe+b2da2f−acd
And this is the general formula for any equation systems in the form:
ax+by=cdx+ey=f
.