If A received 30 from B, A would have twice B.
If B received 50 from A, B would have thrice A.
How much do A and B have?
With the first transfer A will have 2/3 of the money. With the second transfer A will have 1/4 of the money. Then the total amount is 80/(2/3-1/4) = 192.
Then A has 192*(2/3)-30 = 98 and B has 192-98=94.
Checking: (98+30):(94-30) = 2:1 and (98-50):(94+50) = 1:3