A lot of the time, when you are dealing with ratio at the higher levels of the syllabus, you have to be able to deal with amount within a ratio changing (which will change the ratio).
James and John had marbles in the ratio 7:3
John gives James 3 marbles
They now have marbles in the ratio 5:2
How many marbles did john have originally?
We know that the marbles were in the ratio 7:3 but we don't know how many marbles there wer in total so we write the ratio as
7x : 3x
John gives James 3 marbles so the ratio is now
7x + 3 : 3x - 3
We also know that the marbles are now in the ratio 5:2 so we can say that...
7x + 3 : 3x - 3 = 5 : 2
If two ratios are equal, we can say that the first part of one divided by the first part of the other will be equal to the second part of one divide by the second part of the other.
This gives the equation...
We can multiply through to get...
2(7x + 3) = 5 (3x - 3)
14x + 6 = 15x - 15
x = 21
We know that John has 7x marbles originally, so he must have started with 147 (7 x 21) marbles,