So, remember that ratios are part to part, not part to whole. In this case, we have 1 part to 3 parts to 5 parts, which is a total of 9 parts. Since onions are 3/9, which can be simplified to 1/3, of the salsa, multiply 24 by 1/3:
[tex]\frac{24}{1}*\frac{1}{3}=\frac{24}{3}=8[/tex]
In short, to make 24 cups of salsa you need 8 cups of onion.