First, let’s look at the top models. To make things clearer, ignore the green shaded parts. You will be able to see then that it is a simple model which shows Jamie having 288 more beads than Amy.
Now look at the orange shaded parts. They represent 2/3 of what Jamie had. You need to 2/3 the first part as well as 2/3 the extra 288 since they are one whole. The green shaded parts are basically the same except that they have been transferred to Amy.
The bottom models show the final product. Jamie is left with 1 unit + 96 (she had 3 units + 288 at first), and Amy now has 5 units + 192 (she had 3 units at first).
Since we know the difference between Jamie and Amy in the end is 336, we can look at the bottom models and see that the difference of 4 units + 96 = 336.