2x+y=a
3x+6y=b
3x+6y=b
-
Solve the first to get
y=a-2x
Substitue into the second to get
3x+6(a-2x)=b
Solve for x
3x+6a-12x=b
x=-(b-6a)/9
Substitute into the first
2(-(b-6a)/9)+y=b
Solve for y
y=2(b-6a)/9
y=a-2x
Substitue into the second to get
3x+6(a-2x)=b
Solve for x
3x+6a-12x=b
x=-(b-6a)/9
Substitute into the first
2(-(b-6a)/9)+y=b
Solve for y
y=2(b-6a)/9