I will not solve this for you, but I will outline what needs to be done. First of all this is a hypergeometric problem and you need to be familiar with that distribution.
You need to decide whether you count red more than green when there are red balls but no green.
You should start with the blue marbles.
If there are 5 blue marbles, there a no reds or greens.
If there are 4 blue marbles, do you count 1 red as "more" than green?
If there are 3 blue marbles do you count 2 red as "more" than green?
If the answer to these questions is yes, then you need to count that into your final answer.
Now with 2 blue, you can get 3 red and and no green (count it?) and 2 red with 1 green.
With 1 blue you can 4 red and no green (count it?) and 3 red and 1 green.
With no blue, you can get 5 red and no green (ciount it?), 4 red and 1 green and 3 red and 2 green.
Once you decide what to count you need to compute the number of ways each "positive" outcome can happen. The number of ways of each such outcome will be a product of the binomial coefficients, one with 9 to pick from, one with 7 to pick from and one with 5 to pick from. Add up the number of ways of getting the desired outcome.
Then you will divide the sum by 21C5 to get he required probability. Good luck.