x + y = 5 -----------------------------------------(1)
From equation (1), we have
y = 5 - x ----------------------------------------(3)
Substituting equation (3) into equation (2), we have
Therefore
Hence
When x = 3 and using y = 5 - x
y = 5 - 3 = 2
and when x = -2
y = 5 - (-2) = 5+2=7
Therefore the possible solutions are
(3, 2) and (-2, 7)