Okay, let me try to figure out this marble problem. So, there's a bag with yellow and blue marbles. The ratio of blue to yellow marbles is 4:3. Then, if I add 5 blue marbles and remove 3 yellow marbles, the new ratio becomes 7:3. The question is asking how many blue marbles were in the bag before adding the extra ones.

Hmm, ratios can sometimes be tricky, but maybe I can set up some equations to model the situation. Let me start by letting the number of blue marbles be 4x and the number of yellow marbles be 3x. That way, the ratio of blue to yellow is 4:3, which matches the problem statement. So initially, blue marbles = 4x, yellow marbles = 3x.

Then, according to the problem, we add 5 blue marbles. So the new number of blue marbles becomes 4x + 5. At the same time, we remove 3 yellow marbles, so the new number of yellow marbles is 3x - 3. After this change, the ratio of blue to yellow marbles becomes 7:3. So we can set up an equation based on this new ratio.

Let me write that out. The new ratio is (4x + 5)/(3x - 3) = 7/3. Now, I can solve this equation for x. Let's cross-multiply to eliminate the fractions. So, 3*(4x + 5) = 7*(3x - 3). Let me compute both sides.

Left side: 3*(4x + 5) = 12x + 15
Right side: 7*(3x - 3) = 21x - 21

So, the equation becomes 12x + 15 = 21x - 21. Now, let's move all terms involving x to one side and constants to the other. Subtract 12x from both sides: 15 = 9x - 21. Then add 21 to both sides: 36 = 9x. Dividing both sides by 9 gives x = 4.

Now that we have x = 4, we can find the original number of blue marbles, which was 4x. So 4*4 = 16. Therefore, there were 16 blue marbles in the bag before adding the extra ones.

Wait, let me check to make sure this is correct. If there were 16 blue marbles and originally 3x = 12 yellow marbles. Then adding 5 blue marbles gives 21 blue marbles, and removing 3 yellow marbles gives 9 yellow marbles. The ratio 21:9 simplifies to 7:3, which matches the problem statement. So yes, that checks out. Therefore, the answer should be 16 blue marbles.
</think>