The formula you linked to is for the case where you have a bag full of ordered marbles, and are interested in the number of different sequences of a fixed length you can draw (eg $1234$ or $1543$).
Your problem (assuming I understood it correctly) is equivalent to wanting to choose $\#B$ slots out of $\#G+\#B$ for the blue marbles to go into (so if we have $1$ blue and $3$ green marbles, the sequence is determined knowing which of the $4$ positions the blue marble takes, and putting green in all the others; if we have $2$ blue and $2$ green, we need to know which $2$ positions have blue marbles in ect).
The formula for this is the combination formula, $${\#B+\#G \choose \#B} = \frac{(\#B+\#G)!}{\#B!\ \#G!}.$$
Deriving the formula works like this:
First, we treat every marble as being different (so we might have marbles $B_1, B_2, B_3, G_1, G_2$), and count how many ways we could order them. If there are $n$ marbles, then we have $n$ different choices for the first marble we draw; then we have $n-1$ choices for the next since we've already picked one, and so on. In order to determine how many choices there are total, we multiply the number of choices at each stage. In this case we get $5!=5\times4\times3\times2\times1=120$.
Next, we divide by the number of different ways we could order the blue marbles, calculated as before (since $B_1B_2B_3$ and $B_3B_2B_1$ are the same for our purposes - when we look at the different orderings of blue marbles, it might as well be that the green marbles don't exist, so we ignore them). Similarly we also divide by the number of ways of ordering the green marbles. In this example, we have $3!=6$ ways of ordering blue marbles and $2!=2$ ways of ordering green marbles, giving a grand total of $10$ different ways to order $3$ blue and $2$ green marbles.
If we have more than $2$ colours, we can apply the same principle; first give each marble a different label and calculate the total number of orderings, and then divide by the number of ways of ordering the marbles of each individual colour.
We don't have to pretend the marbles are distinct, they are in fact different marbles. It is just that sometimes we don't care to distinguish between them save by colour, or not even by that.
How many ways can we select 2 from 3 red marbles: Let's arrange the three marbles and select the first two: $$\require{enclose}\def\C#1{\color{red}{\enclose{circle}{\color{black}{#1}}}}\begin{array}{l:l}\C 1\C 2\quad \C 3 & \C 2\C 1\quad \C 3 \\ \hdashline \C 1\C 3\quad \C 2& \C 3\C 1\quad \C 2\\ \hdashline\C 2\C 3\quad \C 1& \C 3\C 2\quad \C 1\end{array}$$
So there are $6$ ways... but wait, in some of these the selected marbles are the same but in different orders, but we don't care about the order in which they are selected, only that they are. So there are $3!/2!1!$ ways to select two from three red marbles.
A heap of $n$ elements can be arranged in $n!$ ways, but of these, each arrangement is one among $r!\,(n-r)!$ which contain the same elements among the first $r$. So there are $n!/r!(n-r)!$ distinct ways to select a subset of $r$ elements from a set of $n$.
$${^n\mathrm C_r}~=~\dfrac{n!}{r!~(n-r)!}~=~\dfrac{^n\mathrm P_r}{r!}$$
That's all you need to be concerned with: The count of ways to select $r$ items from $n$ is $^n\mathrm C_r$.
So the probability for obtaining $2$ from $3$ red, $1$ from $5$ green, (and $0$ from $2$ blue,) marbles, when selecting $3$ from all $10$ marbles is …$$\dfrac{{^3\mathrm C_2}\,{^5\mathrm C_1}}{^{10}\mathrm C_3}$$
We count the favoured event: ways to select $2$ from a set of $3$, and to select $1$ from a set of $5$.
We count the total space: ways to select $3$ from a set of $10$.
We divide and calculate.
Best Answer
Your formula is correct, and it can be reduced to a closed form:
$$\begin{align*} \sum_{j=0}^{i-1}\binom{i}{j+1}\binom{n-i}j&=\sum_{j=0}^{i-1}\binom{i}{j+1}\binom{n-i}{n-i-j}\\ &=\sum_{j=1}^i\binom{i}j\binom{n-i}{n-i+1-j}\\ &=\sum_{j=0}^i\binom{i}j\binom{n-i}{n-i+1-j}-\binom{i}0\binom{n-i}{n-i+1}\\ &=\sum_{j=0}^i\binom{i}j\binom{n-i}{n-i+1-j}-0\\ &=\binom{n}{n-i+1}\\ &=\binom{n}{i-1} \end{align*}$$
by Vandermonde’s identity.
You can look at it like this: you choose $j$ of the blue marbles to keep and $i-(j+1)$ of the red marbles not to keep, so in every case you’re choosing a total of $i-1$ marbles from the total collection of $n$ marbles. Conversely, if you start with any $i-1$ of the $n$ marbles, let $j$ be the number of them that are blue. You’re going to keep the $j$ blue marbles, so $y=j$. The remaining $i-1-j$ are red, and those are the red ones that you’re really planning not to choose for your final selection of $x$ red marbles, so $x=i-(i-1-j)=j+1=y+1$, as desired.