Multinomial Expansion Question: when variables appear more than once Find the coefficient of $x^{12}y^{24}$ in $(x^3 + 2xy^2 +y + 3)^{18}$.
I have been working on this problem for a while now and I cannot figure out how to use the multinomial theorem to solve it. I tried using auxiliary variables but then I did not know what the total exponent should be. I am really stuck on this.

Break it into cases based on how the $x^{12}$ was formed from some combination of $x^3$ and $2xy^2$.  In each case, you must also check that it is possible that $y$ could be raised to the 24th power using the remaining available options.
Case 1: $(x^3)^4$: You might have had an $x^{12}y^{24}$ term because of $(x^3)^4\cdot (2xy^2)^0\cdot(y)^{24}\cdot 3^n$, but we're only raising to the 18th power, so that can't happen.  
Case 2: $(x^3)^3$:  It could have been $(x^3)^3\cdot(2xy^2)^3\cdot (y)^{18}\cdot 3^n$.  Also not possible, not large enough power available.
Case 3: $(x^3)^2$:  In this case it might have been $(x^3)^2\cdot (2xy^2)^6\cdot y^{12}\cdot3^n$, again not possible.  It would again require too large of a power of the original function (at least being raised to 20th power)
Case 4: $(x^3)^1$: This would imply it would be $(x^3)^1\cdot (2xy^2)^9\cdot (y)^6\cdot(3)^2$  This is infact possible.
Case 5: $(x^3)^0$:  This would imply that it would be $(x^3)^0\cdot (2xy^2)^{12}\cdot (y)^0\cdot (3)^6$  This also is possible.
Now you know that it could have been formed one of two ways.  Reimagining the problem instead as $(a+b+c+d)^{18}$, the question is then what are the coefficients of the $ab^9c^6d^2$ and $b^{12}d^6$ terms.
The coefficient of the $ab^9c^6d^2$ term is $\dfrac{18!}{1!9!6!2!}$ and the coefficient of the $b^{12}d^6$ term is $\dfrac{18!}{12!6!}$
So, we have $\dfrac{18!}{1!9!6!2!}(x^3)^1\cdot (2xy^2)^9\cdot (y)^6\cdot(3)^2 + \dfrac{18!}{12!6!}(2xy^2)^{12}\cdot (3)^6 = Cx^{12}y^{24}$
So, $C = \dfrac{18!}{9!6!2!}\cdot 2^9\cdot3^2 + \dfrac{18!}{12!6!}\cdot 2^{12}\cdot 3^6$
