David had two bags A and B, container sugar. If he removed 2kg of sugar from bag A and added it to bag B, the mass of sugar in bag B would be four times the mass of the sugar in bag A. If he added 10kg of sugar to the original amount of sugar in each bag, the mass of sugar in bag B would be twice the mass of the sugar in bag A. Calculate the original mass of sugar in each bag.

1 answer

original amounts,
A --- x kg
B --- y kg

after 1st scenario:
A --- x-2
B --- y+ 2
x+2 = 4(y-2)
x+2 = 4y - 8
x - 4y = -10 **

after 2nd scenario:
A --- x+10
B --- y+10
y+10 = 2(x+10)
y+10 = 2x + 20
2x - y = -10 ***

solve these two equations in x and y
I would change ** to x = 4y-10 and use substitution