Suppose we wish to compute the probability of drawing $x$ red, $y$ blue, and $z$ green balls in a specific order. As per the conditions, starting with 1 of each color and adding a ball of the last chosen color after each selection, convince yourself the probability of this event is simply
$$\small \left(\frac{1}{3}\cdot \frac{2}{4}\cdot...\cdot\frac{x}{x+2}\right)\cdot \left(\frac{1}{x+3}\cdot \frac{2}{x+4}\cdot...\cdot\frac{y}{x+y+2}\right)
\left(\frac{1}{x+y+3}\cdot \frac{2}{x+y+4}\cdot...\cdot\frac{z}{x+y+z+2}\right),$$
and letting $n=x+y+z$ denote the total draws, this is simply
$$\frac{2x!y!z!}{(n+2)!}.\qquad [1]$$
Now, to find the probability of drawing $x$ red, $y$ blue, and $z$ green in any order, we need to count all the different orderings in which we could have drawn these balls, i.e. count the number of ways to rearrange the following sequence of length $n$:
$$\underbrace{R...R}_{x \text{ of these}}\quad \underbrace{B...B}_{y \text{ of these}}\quad \underbrace{G...G}_{z \text{ of these}}.$$
There are $\frac{n!}{x!y!z!}$ such permutations because there are $n!$ ways to arrange a list of $n$ distinct items, but to avoid overcounting, we must divide out the ways to rearrange the indistinguishable duplicates of each color (there are $x!$ ways to rearrange the $R$s etc.).
So multiplying the number of permutations by the probability in $[1]$ gives us the probability of drawing our $x$ red, $y$ blue, and $z$ green balls in any order, as desired:
$$\frac{n!}{x!y!z!}\frac{2x!y!z!}{(n+2)!}=\frac{n!2}{(n+2)!}. $$
Note that when order doesn't matter, this probability doesn't depend on how many balls of each color we draw; it only depends on our total draws.
Best Answer
$X$ is the count of green objects, $Y$ is the count of balls.
Then the margarine probabilities are:$$\Pr (X=x) = \dfrac{\binom 2 x ~ \binom 4 {2-x}}{\binom 6 2}~\mathbf 1_{x\in\{0,1,2\}}\\ \Pr(Y=y) = \dfrac{\binom 3 y ~ \binom 3 {2-y}}{\binom 6 2}~\mathbf 1_{y\in\{0,1,2\}}$$
However, you cannot simply multiply these together to obtain the joint probability, since the random variables are not independent. There is a green ball which might be picked. It's existence must be accommodated.
Let $Z\in\{0,1\}$ be the count of green balls drawn. Use Total Probability partitioned on whether a green ball is drawn or not. Then consider ways to pick from the 1 green ball, 1 green marbles, 2 not-green balls, and 2 not-green marbles.
$$\Pr(X=x, Y=y) = \Pr(Z=0, X=x, Y=y) + \Pr(Z=1, X-Z=x-1, Y-Z=y-1) \\ =\frac{\binom{1}{0}\binom{1}{?}\binom{2}{?}\binom{2}{?}}{\binom 6 2}\mathbf 1_{x\in\{0,1\}, y\in\{0,1,2\}, x+y\leq 2}+\frac{\binom{1}{1}\binom{1}{?}\binom{2}{?}\binom{2}{?}}{\binom 6 2}\mathbf 1_{x\in\{1,2\},y\in\{1,2\}, x+y\leq 3}$$