There were 15 blue marbles in the bag before removing some
Let B=blue marbles and Y= yellow marbles
The ratio of B to Y is
[tex]\frac{B}{Y} =\frac{8}{5}[/tex]
If we remove 12 blue marbles and add 12 yellow marbles,
the ratio will be
[tex]\frac{B-12}{Y+21} =\frac{1}{3}[/tex]
[tex]3(B-12)=1(Y+21)[/tex]
[tex]3B-36=Y+21\\[/tex]
[tex]3(\frac{8}{5}Y)-36=Y+21[/tex]
[tex]\frac{24}{5}Y-Y=21+36[/tex]
[tex]\frac{19}{5}Y=57[/tex]
[tex]Y=\frac{57*5}{19}\\[/tex]
[tex]Y=15[/tex]
[tex]B=\frac{8}{5} (15)\\B=24[/tex]
Hence, there were 15 blue marbles in the bag before removing some
Learn more about Ratio here https://brainly.com/question/2328454
#SPJ4