If x + 3y = 1, then x = 1 - 3y.
Then in the second equation, replace x with 1 - 3y :
-x + 2y = 4
- (1 - 3y) + 2y = 4
-1 + 3y + 2y = 4
-1 + 5y = 4
5y = 5
y = 1 → x = -2
since x = 1 - 3•1 = 1 - 3 = -2.
Alternatively, you can instead solve for y in the first equation, so that if x + 3y = 1, you get
x + 3y = 1
3y = 1 - x
y = (1 - x)/3
Then replace y in the second equation:
-x + 2y = 4
-x + 2 ((1 - x)/3) = 4
-x + 2/3 (1 - x) = 4
Multiply both sides by 3 to get rid of the fraction:
-3x + 2 (1 - x) = 12
-3x + 2 - 2x = 12
-5x + 2 = 12
-5x = 10
x = -2 → y = 1
since y = (1 - (-2))/3 = (1 + 2)/3 = 3/3 = 1.