x+2y=5
3x+y=5
Subtract 3x from both sides of the second equation:
y = 5 - 3x
Substitute this into the first equation:
x + 2(5 - 3x) = 5
or
x + 10 - 6x = 5
-5x = -5
x = 1
Substitute this back into the equation for y
y = 5 - 3*1
y = 2
.