Person A has one amount of money in his pocket, Person B has one amount of money in his pocket. If person A gives X amount to person B, person B will end up with 3 times more money than person A. However if person B gives the same amount X to person A, Person A will end up with double the amount of person B.

How much does each of the persons have in his pocket and what amount are they giving to each other?

1 answer

(A-x)3 =B+x
3A - 3 x = B + x
4 x = 3A-B

(B - x)2 = A + x
2 B - 2x = A + x
3x = 2 B - A

12 x = 9 A - 3 B
12 x = 8 B - 4 A
---------------
0 = 13 A - 11 B
11 B = 13 A
a solution is
A = 11 and B = 13
then remember
3x = 2 B - A
3 x = 26 - 11 = 15
x = 5

multiples of those will also work though
like
A =22, B =26, x = 10