13, because, if you chose 12 it is possible, though very unlikely, to have
gotten 8 reds and 4 greens, and no blues, or 8 reds, 4 blues, and no greens. But by the 13th you must have at least one of every color.
If 300 beans cost you x dollars. How many beans can you purchase
for 50 cents at the same rate?
"300 beans IS TO x dollars AS y beans IS TO dollar."
300 beans IS TO $x AS y beans IS TO $.50.
In mathspeak, "IS TO" means "OVER", and "AS" means "EQUALS"
300 beans OVER $x EQUALS y beans OVER $.50.
Cross multiply:
Divide both sides by x:
beans,
Edwin