Maria has a bag containing red and blue marbles. She has 4 red marbles and a certain number of blue marbles. If the total number of marbles in the bag is 12, how many blue marbles does Maria have?
Let r represent the number of red marbles and b represent the number of blue marbles. We can express this situation with the following equation:
$$r + b = 12$$
Given that Maria has 4 red marbles, substitute r with 4 in the equation to find the value of b.