460/(3+ 1)= 1 15
1 15-40=75 B
115 * 3+120 = 465 or 540-75 = 465A.
This is an extension of the doubling problem. A minus 120 and b plus 40, the sum of the two numbers is now 540- 120+40=460.
Now B is 460 ÷ (3+1) =115, and now A is 1 15×3=345.
Original a is 345+ 120=465, and original b is 1 15-40=75.
It turns out that the number of A is 465-75=390.