Consider $5$ dice, each with six sides, three of which are labeled $1$ and three of which are labeled $2$. How many ways are there to get a sum of $9$ from rolling these five dice?
I'm learning about generating functions and found this problem. I was given the hint that $$(1+x)^5 =x^5 + 5x^4 +10x^3 +10x^2 +5x+1.$$ Now the generating function that corresponds to the situation asked is $$(3x+3x^2)^5$$ as for each die the genrating function is $3x+3x^2$, but I cannot figure out what to do with the algebra here. My goal is to find out the coefficient of the $x^9$th term, but I don't really want to expand $(3x+3x^2)^5$.
$(3x+3x^2)^5=(3x(1+x))^5$, we know that $(a\times b)^k =(a^k \times b^k)$ , then $(3x(1+x))^5=(3x)^5(1+x)^5$ , so we have exponenetial $5$ form $(3x)^5$ , then find the coefficient of $x^4$ in the expansion $(1+x)^5$ to reach $x^9$ using binomial expansion such that $(1+x)^5= \binom{5}{n}(1)^{5-n}(x)^n$ , so we need the case where $n=4$.
Then , $3^5 \times C(5,4) =243 \times 5 =1215$