Create matrix:
⎡ 5 9⎤
⎣ 6 -2⎦
and its determinant D: 5×(-2)-9×6=-10-54=-64; D=-64.
Solution for x requires determinant X=
⎡ -30 9⎤
⎣ 28 -2⎦=
(-30)×(-2)-9×28=60-252=-192. x=X/D=-192/-64=3, so x=3.
Solution for y requires determinant Y=
⎡ 5 -30⎤
⎣ 6 28⎦=
5×28-(-30)×6=140+180=320. y=Y/D=320/-64=-5, so y=-5.
CHECK by substitution:
5x+9y=15-45=-30✔️
6x-2y=18+10=28✔️
Other matrix-based solutions are available.