I would like someone to help me so I can understand what to do. Pls anyone

we have that
2 cups in a pint
2 pints in a quart
4 quarts in a gallon
so
4 cups in 2 pints
4 cups in a quart
16 cups in 4 quarts
16 cups in a gallon
and
we have
3 parts red and 5 parts yellow
3 parts +5 parts=8 parts
8 parts=1 gallon
red paint fraction is 3/8 gallon
yellow paint fraction is 5/8 gallon
Remember that
I need 16 cups for a gallon
Apply proportion
16/1=x/(3/8)
x=(3/8)16