\(\displaystyle ax + by = c \implies -adx - bdy = -cd.\)
\(\displaystyle dx + ey = f \implies +adx + aey = +af.\)
\(\displaystyle SO\ adx + aey - adx - bdy = af - cd \implies aey - bdy = y(ae - bd) = af - cd \implies\)
\(\displaystyle y = \dfrac{af - cd}{ae - bd}.\)
\(\displaystyle SO\ ax + by = c \implies ax + b\left(\dfrac{af - cd}{ae - bd}\right) = c \implies ax = c - \dfrac{abf - bcd}{ae - bd} = \dfrac{ace - bcd - abf + bcd}{ae - bd} = \dfrac{a(ce - bf)}{ae - bd}\implies\)
\(\displaystyle x = \dfrac{ce - bf}{ae - bd}.\)
Let's check
\(\displaystyle ax + by = a\left(\dfrac{ce - bf}{ae - bd}\right) + b\left(\dfrac{af -cd}{ae - bd}\right) = \dfrac{ace - abf + abf - bcd}{ae - bd} = \dfrac{ace - bcd}{ae - bd} = \dfrac{c(ae - bd)}{ae - bd} = c.\)
Good so far.
\(\displaystyle dx + ey = d\left(\dfrac{ce - bf}{ae - bd}\right) + e\left(\dfrac{af -cd}{ae - bd}\right) = \dfrac{cde - bdf + aef - cde}{ae - bd} = \dfrac{aef - bdf}{ae - bd} = \dfrac{f(ae - bd)}{ae - bd} = f.\)
Yes, it works in general.