Let a and b also represent the amounts each has at the beginning.
a+30=2(b-30); a+30=2b-60; a-2b=-90 or -a+2b=90.
b+10=3(a-10)=3a-30; 3a-b=40; 6a-2b=80.
-a+6a=170; 5a=170, a=34. 2b=90+a=124, b=62.
CHECK: b gives a 30 mangoes, so a now has 64 mangoes and b has 32. 64=2*32.
a gives b 10 mangoes, so b now has 72 mangoes and a has 24. 72=3*24.