5x−8y=−5(1)−4x+5y=4(2)
To get a solution for x, if we multiply equation (1) by 5 and equation (2) by 8, we will have two equations with equal and opposite y-coefficients:
25x−40y=−25(3)−32x+40y=32(4)
Now, add equation (4) to equation (3) to eliminate the y terms:
(25−32)x=−25+32−7x=7.
So the solution for x is x=−1.
To obtain a solution for y we can substitute this value of x into either of our initial equations. Using equation (1), we obtain
−5−8y=−5−8y=−5+5−8y=0y=0