I think the two equations should be like this....
If Alice receives n dollars from Bob, then she will have 3 times as much money as Bob.
A + n = 3 * (B - n)
If she gives n dollars to Bob, then she will have 2 times as much money as Bob.
A - n = 2 * (B + n)
So we have..
A + n = 3B - 3n → A = 3B - 4n → 3A = 9B - 12n
A - n = 2B + 2n → A = 3B + 3n → 4A = 12B + 12n Add these two to get..
7A = 17B → 7A / B = 17 → A / B = 17 / 7
this one was hard