Compositions of 50 with unique restrictions solve by generating function. Consider the compositions of 50 that have exactly 5 summands, such that the first and last summands are odd, all other summands are even, and no summand is greater than 20. 
Use a generating function to count the number of such compositions. 
Simplify your answer to an integer.
$(x^2+x^4+...+x^{20})^3=x^6 (1+x^2+...+x^{18})^3$ 
i think this counts all the even summands (there is 3 of them so i cubed it.)
the odd summands should be $(x+x^3+....+x^{19})^2$ 
so we have $g(x)= x^8(1+x^2+....+x^{18})^2 (1+x^2+...+x^{18})^3= x^8(1+x^2+...+x^{18})^5 = \frac{1-y^{9+1}}{1-y}=(\frac{1-x^{20}}{1-x^2})^5x^8$
theres about half a dozen things im lost on. 
The fact that its a composition means the odd sum should be $(x+x^3+...+x^{19})$ right?
$ \frac{1-y^{9+1}}{1-y}=(\frac{1-x^{20}}{1-x^2})^5x^8$ im not sure this substitution is right could easily be $x^{19}$ instead of 20
Lastly from $(\frac{1-x^{20}}{1-x^2})^5x^8$ how do i push this into a suming serie so i can talk about the coefficient of the  $x^{50}$ term?
 A: You have it all correct so far.
To alay some of your concerns I have personally always found it far easier to remember the formula for the sum of a finite geometric sequence as
$$\text{sum of geometric sequence}=\frac{(\text{first term})\: -\: (\text{term after last term})}{1\: -\: \text{ratio}}$$
In this case you have $1+x^2+x^4+\ldots +x^{18}$ with a ratio of $x^2$, so the term after last would be $x^{20}$ and obviously the first term is $1$, hence
$$1+x^2+x^4+\ldots +x^{18}=\frac{1-x^{20}}{1-x^2}$$
So you have correctly arrived at the generating function
$$x^8\left(\frac{1-x^{20}}{1-x^2}\right)^5$$
$$\implies x^8\frac{(1-x^{20})^5}{(1-x^2)^5}$$
$$\implies x^8(1-x^{20})^5(1-x^2)^{-5}$$
$$\implies x^8\left(\sum_{k=0}^{5}(-1)^k\binom{5}{k}x^{20k}\right)(1-x^2)^{-5}$$
The binomial with negative index has a Taylor expansion, or we could substitute $y=x^2$ and realise that the combinatorial interpretation for the $r^{\text{th}}$ coefficient of this is just the number of ways of placing $r$ balls into $5$ bins, there are $\binom{4+r}{4}$ ways to do this using stars and bars, hence
$$\begin{align}(1-x^2)^{-5}=(1-y)^{-5}&=\sum_{r\ge 0}\binom{4+r}{4}y^r\\&=\sum_{r\ge 0}\binom{4+r}{4}x^{2r}\end{align}$$
we can then multiply out 
$$\left(\sum_{k=0}^{5}(-1)^k\binom{5}{k}x^{20k+8}\right)\left(\sum_{r\ge 0}\binom{4+r}{4}x^{2r}\right)$$
$$\implies \sum_{r\ge 0}\left(\sum_{k=0}^{5}\left((-1)^k\binom{5}{k}\binom{4+r}{4}x^{20k+2r+8}\right)\right)$$
If we re-label $p=20k+2r+8$ and sum over $p$ instead of $r$ then $r=(p-20k-8)/2$ so our generating function is
$$\sum_{p\ge 8}\left(\sum_{k=0}^{5}(-1)^k\binom{5}{k}\binom{\frac{p}{2}-10k}{4}\right)x^{p}$$
the coefficient of $x^{50}$ is
$$\sum_{k=0}^{5}(-1)^k\binom{5}{k}\binom{25-10k}{4}$$
or, defining $\binom{a}{b}=0$ for $a<0$ we have
$$\binom{5}{0}\binom{25}{4}-\binom{5}{1}\binom{15}{4}+\binom{5}{2}\binom{5}{4}=5\,875$$
