Xuxian and Rachel had the same number of marbles. After Rachel gave away 10 marbles and Xuxian gave away 22 marbles, Rachel had 3 times as many marble as Xuxian. How many marbles did each of them have at first
Let Xuxian and Rachel had X and R marbles first time. Then we can write down the system of equations:
X = R,
R - 10 = 3(X - 22).
Let's solve it. Substituting the first equation into the second one we obtain:
R - 10 = 3(R - 22) ==>
R - 10 = 3R - 66 ==>
56 = 2R ==>
R = 28.
Therefore, Xuxian and Rachel had 28 marbles each.