,
and 
To solve the system, we need the inverse of A, which we write as A-1.
Swap leading diagonal:
Change signs of the other 2 elements:
Now we find the determinant of A:
|A| = -5 - 10 = -15
So

So the solution to the system is given by:

This answer means that we have found the solution x = -2 and y = 2/5.
Is the solution correct?
We check it in the original set of equations:
Substituting x = -2 and y = 2/5, we get:
−(−2) + 5×(2/5) = 2 + 2 = 4
2×(−2) + 5×(2/5) = −4 + 2 = −2
So the solution to the original system of equations is
x = -2, y = 2/5.