First assume groups $1$ and $2$ are distinguishable.
The number of possibilities for group $1$ is the number triples $(a,b,c)$ of nonnegative integers that $a \le 6,\;b\le 4,\;c \le 2$, and $a+b+c=6$, where $a,b,c$ are the number of items chosen from groups $A,B,C$ respectively.
If we temporarily ignore the upper bounds, the stars-and-bars formula yields a count of
$$\binom{6+3-1}{3-1}=28$$
But we need to exclude those triples for which $b > 4$ or $c > 2$.
Consider cases . . .
Case $(1)$:$\;b > 4$.
Writing $b=5+r$, the equation $a+b+c=6$ reduces to $a+r+c=1$, with no restrictions on the integers $a,r,c$ other than nonnegativity, so it's immediate that exactly one of $a,r,c$ is one, the other two are zero. Thus, we have $3$ triples $(a,b,c)$ for case $(1)$.
Alternatively (though overkill for this simple case), the stars-and-bars formula could have been applied to the equation $a+r+c=1$, yielding a count of
$$\binom{1+3-1}{3-1}=3$$
matching the result we obtained via direct count.
Case $(2)$:$\;c > 2$.
Writing $c=3+s$, the equation $a+b+c=6$ reduces to $a+b+s=3$, with no restrictions on the integers $a,b,s$ other than nonnegativity, so applying the stars-and-bars formula to the equation $a+b+s=3$ yields a count of
$$\binom{3+3-1}{3-1}=10$$
Subtracting the counts for cases $(1)$ and $(2)$, the corrected count is
$$28-3-10=15$$
If the groups are regarded as indistinguishable, then with the exception of the triple $(3,2,1)$, each of the $15$ triples $(a,b,c)$ is counted twice; once as $(a,b,c)$, and once as $(6-a,4-b,2-c)$, so the count would need to be further corrected to
$$1+{\frac{15-1}{2}}=8$$