To divide N objects into ratio a:b, add the ratios: a+b, then there will be aN/(a+b) of one object and bN/(a+b) of the other. These added together come to (a+b)N/(a+b)=N; and divided are a/b or a:b.
Example: A bag contains 20 red and blue marbles in the ratio 2 red to 3 blue. How many of each? So N=20 a=2 and b=3. aN/(a+b)=2*20/(2+3)=40/5=8 and 20-8=12. 8 red and 12 blue.
Another example: A pet shop was selling hamsters, rabbits and mice. If the ratio of these animals is 6:4:5 (hamsters, rabbits, mice) and the shop has 60 such animals, how many of each were there? This time we have 3 ratios. N=60 and a=6, b=4 and c=5. Hamsters=6*60/(6+4+5)=24; rabbits=4*60/(6+4+5)=16; mice=5*60/(6+4+5)=20.