Probability of drawing all red balls before any green ball Question: 
Suppose that a box contains $r$ red balls, $g$ green balls,
and $b$ blue balls. Suppose also that balls are drawn from
the box one at a time, at random, without replacement.
What is the probability that all $r$ red balls will be obtained
before any green balls are obtained?
Solution(Partial): 
I know this solution for $1$ red, $1$ green and $1$ blue balls:
$$\begin{array}{c|l|c}
\color{red}{red} & \color{green}{green} & \color{blue}{blue}  \\
\hline \\
\color{blue}{blue} & \color{red}{red} & \color{green}{green}  \\
\hline \\
\color{red}{red} & \color{green}{green} & \color{blue}{blue}   \\\hline \\
\color{green}{green} & \color{red}{red} & \color{blue}{blue}    \\\hline \\\color{green}{green} & \color{blue}{blue}  &  \color{red}{red} \\\hline \\ \color{blue}{blue}  & \color{green}{green} & \color{red}{red} \\
\end{array}$$
This means,that there are $3$ outcomes for this event with the sample space of $6$.So, probability is $\frac{1}{2}$.
But I don't know how to generalize this.
Please help.Thank you.
 A: To count the sequences of $r+b+g$ draws in which all of the red balls precede all of the green balls, note that they are obtained by starting with the sequence
$$\underbrace{RR\ldots RR}_r\underbrace{GG\ldots GG}_g$$
and inserting the $b$ blue balls arbitrarily into the sequence. This is a straightforward stars-and-bars problem; the link has both a formula and a pretty decent explanation of it, but if you have questions, leave a comment. Bear in mind that in any given sequence the $r$ red balls can actually be arranged in $r!$ orders, the blue balls in $b!$, and the green balls in $g!$, so that a given sequence of colors actually corresponds to $r!b!g!$ different sequences of balls drawn. However, since this is the same for each sequence of colors, it does no harm to count sequences of colors instead of sequences of balls.
Once you have that, you need only count the possible sequences of colors. You have to choose $r$ positions for the red balls, $b$ for the blue balls, ...
A: The presence of blues is not relevant to the probability. Imagine that the reds and greens are all distinct, and lined up in a row at random.  We remove them one at a time, starting on the left.  
There are $(r+g)!$ equally likely ways that the balls can be arranged. There are $r!g!$ ways to arrange them so that the reds are all before the greens. Thus the required probability is $\dfrac{r!g!}{(r+g)!}$.
This can be rewritten more compactly as $\dfrac{1}{\binom{r+g}{r}}$.   
A: Here is a variation on Brian's answer. The ball colors can occur in ${(r+g+b)!\over r!g!b!}$ distinct orders, all of which are equally likely to occur. 
We now count the number of "good" orders. Start with $r+g+b$ blank spaces and choose $b$ of them to be filled with blue balls. The remaining spaces can only be filled in one "good" way, so the number of good orders is $r+g+b\choose b$.
The required probability is $${{r+g+b\choose b} \over {(r+g+b)!\over r!g!b!}},$$ which  simplifies to the expression in André's answer.   
