Answer: D

Important to note is that all marbles must be used. The question gives variables for the numbers of red and blue marbles in each bag to indicate that the number of each color marble in each bag is equal, so if one bag has, say, 7 blue marbles, every bag has 7 blue marbles.

This drastically reduces our options. For instance, the number of bags must be a factor of 84, limiting us to 1, 2, 3, 4, 6, 7, 12, 21, 28, 42, and 84. That's still quite a few options, but of course not all of these will work, since we also have to consider the 30 blue marbles. The number of bags also must be a factor of 30: 1, 2, 3, 5, 6, 10, 15, or 30.

The number of bags, then, must be a member of both of those lists: 1, 2, 3, or 6. We're looking for the maximum number of bags that could be created, so we take the largest number from the list, 6, choice (D).