The ratio of green to yellow rattles sold is 2 : 7
Total number of rattles sold = 108
Number of green rattles sold :
(Total rattles / sum of ratio) × green ratio
(108 / (2 + 7)) × 2
(108 / 9) × 2 = 12 × 2 = 24 rattles
Number of Yellow rattles sold :
(Total rattles / sum of ratio) × yellow ratio
(108 / (2 + 7)) × 7
(108 / 9) × 7 = 12 × 7 = 84 rattles