<s>[INST] Problem solving a word problem using a generating function 
How many ways are there to hand out 24 cookies to 3 children so that they each get an even number, and they each get at least 2 and no more than 10? Use generating functions. 

So the first couple steps are easy.
The coefficient is $x^{24}$
$g(x) = x^6(1+x^2+x^4+x^6+x^8)^3$ or  what I got was $x^6 (1 + (x^2)^1 +...+ (x^2)^4)^3$
now finding the closed formula is where I am having problems 
My answer: using the fact that $\dfrac{1-x^{n+1}}{1- x}$
I get $x^6\left(\dfrac{1-x^9}{1-x}\right)$ which is wrong 
The correct answer: $x^6\left(\dfrac{1-x^{10}}{1-x^2}\right)$
If someone could explain in some detail on how to get the correct formula would be much appreciated. Thanks!
 [/INST] Your expression $g(x) = x^6 (1+x^2+\cdots+x^8)^3$ is correct, but the geometric series formula needs to be used correctly.  Recall the geometric series formula for the sum of 5 terms:  $a+ar+\cdots+ar^4 = \frac{a(1-r^5)}{1-r}$.  In our case, $r=x^2$ and $a=1$. So $1+x^2+\cdots+x^8$ simplifies to $\frac{1-(x^2)^5}{1-x^2} = \frac{ 1-x^{10}}{1-x^2}$. 
Hence, the number of ways in question is the coefficient of $x^{24}$ in $x^6 \left(\frac{1-x^{10}}{1-x^2} \right)^3$.  Notice some differences with your answer: the denominator has $x^2$ (not $x$) since the common ratio of the geometric series is $x^2$; the geometric series formula with $n$ terms has an $n$ (not $n+1$) in the exponent. Also, don't forget to take the third power. 
</s>