Easy,
those 24 green jelly beans made up ONLY 8% of the bag.
So set up an equation,
24 is 8% of what? (change 8% into a decimal, 0.08)
24=0.08*b (b for beans, :D)
Divide by 0.08, to get the answer.
[tex] \frac{24}{0.08} = \frac{0.08b}{0.08} [/tex]
300=b
Thus, there are 300 jelly beans in the bag.