There are 8 total "parts" of marbles, 3 in box A and 5 in box B. The 2-part difference is 10 marbles, so each part is 10/2 = 5 marbles.
1. There are 8(5) = 40 marbles altogether.
2. Box A starts with 3(5) = 15 and Box B starts with 5(5) = 25. If we move 3 from A to B, we now have a ratio of 22:28. Reduced, that's 11:14.