whats the probability of drawing marbles randomly from a bin A bin contains contains 10 Orange and 12 Green marbles. A random set S of 6 marbles
are removed from the bin without replacement. What is the probability that S contains at
least 2 Orange marbles, given that S contains an Orange marble? What is the probability
that that S contains at least 2 Orange marbles, given that S contains a Green marble?
Solution: Consider the various sets shown in the figure below. Thus, since there are just $\binom{22}{6} - \binom{10}{6}$ ways of choosing 6 marbles with at least one Orange marble, then the probability of choosing 6 marbles with exactly one Orange given that the selection is known to have at least one Orange is $$\frac{10\binom{12}{5}}{\binom{22}{6} - \binom{12}{6}}$$ Therefore, the complementary event, namely that the selection has at least two
Orange marbles, given that it is known that it has at least one Orange is $$1-\frac{10\binom{12}{5}}{\binom{22}{6} - \binom{12}{6}}$$
For the second part we want Pr(S has ≥ 2 Orange | S has ≥ 1 Green).
The desired probability is seen to be $$\frac{\binom{22}{6}-\binom{10}{6}-\binom{12}{6}-10\binom{12}{6}}{\binom{22}{6}-\binom{10}{6}}$$

i'm having trouble understanding this problem especially the second part, can someone walk me through it so i can understand
 A: Let’s look at the second part. You’re given that you have at least one green marble. There are $\binom{22}6$ possible sets of $6$ marbles that you could have drawn, and there are $\binom{10}6$ sets consisting entirely of orange marbles, so there are $\binom{22}6-\binom{10}6$ sets containing at least one green marble, and you know that you’ve drawn one of these $\binom{22}6-\binom{10}6$ sets. Since each of these sets is equally likely to be the one that you’ve drawn the probability that you’ve drawn at least two marbles is
$$\frac{\text{number of these sets containing }\ge 2\text{ orange marbles}}{\binom{22}6-\binom{10}6}\;.\tag{1}$$
To calculate the numerator, start with $\binom{22}6-\binom{10}6$, the number of sets of marbles containing at least one green marble, and subtract the sets that don’t have at least two orange marbles. These are of two types, those that have no orange marbles, and those that have exactly one orange marble. In order to have no orange marble, a set must be chosen entirely from the $12$ green marbles, and there are $\binom{12}6$ ways to do this. To choose a set with exactly one green marble, we must pick one of the $10$ green marbles and any $5$ of the $12$ orange marbles; there are $10$ ways to pick the green marble and $\binom{12}5$ ways to pick the $5$ orange marbles, so there are $10\binom{12}5$ to choose a set with exactly one green marble. Thus, there are altogether $\binom{12}6+10\binom{12}5$ ‘bad’ sets of marbles $-$ sets that contain fewer than $2$ orange marbles. That leaves 
$$\left(\binom{22}6-\binom{10}6\right)-\left(\binom{12}6+10\binom{12}5\right)\;,$$
or 
$$\binom{22}6-\binom{10}6-\binom{12}6-10\binom{12}5\tag{2}$$
‘good’ sets of marbles $-$ those with at least $2$ orange marbles $-$ among the $\binom{22}6-\binom{10}6$ in the available pool consisting of sets with at least one green marble. That is, $(2)$ is the numerator that we need for the probability $(1)$, which can now be written
$$\frac{\binom{22}6-\binom{10}6-\binom{12}6-10\binom{12}5}{\binom{22}6-\binom{10}6}\;,$$
exactly as in the solution that you’ve been given.
(I’ll be happy to answer questions about the first part, too, but it’s a bit simpler, and after working through this you may well be able to sort it yourself.)
