You can add 4 more yellow marbles to make the ratio of yellow to blue marbles 2 to 1.
A ratio of 2 to 1 means that one of the objects have twice the amount of the other. Since blue originally had 6 marbles, simply multiply that by 2 and you should get how many yellow marbles you need in total and since you already have 8 yellow marbles, all you need is to add four.
The final ration will be
yellow : blue
12 : 6
2 : 1