The problem is your first generating function. What you have typed is the generating function for the sequence $(0,1,2,4,8,16,...)$. The correct generating function is $$\sum_{n = 0}^\infty2^nx^{2n} = \frac{1}{1 - 2x^2}$$.
Once you have made this correction, your second step should work in producing the right generating function for the entire sequence.
You’ve a small error in evaluating the geometric summation:
$$2\sum_{n\ge 1}(-1)^nx^n=\frac{-2x}{1+x}\;,$$
not $\frac2{1+x}$, because the summation starts at $n=1$, not at $n=0$. The other summation is
$$2\sum_{n\ge 1}(-1)^{n-1}nx^n=-2\sum_{n\ge 1}n(-x)^n=\frac{-2(-x)}{\big(1-(-x)\big)^2}=\frac{2x}{(1+x)^2}\;,$$
as noted by AccidentalFourierTransform in the comments. Thus, you have
$$\begin{align*}
A(x)&=\frac1{1-x}\left(1-\frac{2x}{1+x}+\frac{2x}{(1+x)^2}\right)\\
&=\frac{(1+x)^2-2x(1+x)+2x}{(1-x)(1+x)^2}\\
&=\frac{1+2x-x^2}{(1-x)(1+x)^2}\;.
\end{align*}$$
Just for fun, I checked this by finding $A(x)$ in a completely different way that you might find instructive. Let
$$\begin{align*}
f(x)&=\sum_{n\ge 0}(2n+1)x^{2n+1}\\
&=\sum_{n\ge 0}nx^n-\sum_{n\ge 0}2nx^{2n}\\
&=\frac{x}{(1-x)^2}-\frac{2x^2}{(1-x^2)^2}\;.
\end{align*}$$
It’s not hard to see that $A(x)=1+f(x)-xf(x)=1+(1-x)f(x)$: $-xf(x)$ yields the $x^{2n}$ terms for $n>0$. Thus,
$$\begin{align*}
A(x)&=1+(1-x)f(x)\\
&=1+\frac{x}{1-x}-\frac{2x^2}{(1-x)(1+x)^2}\\
&=\frac{1+2x-x^2}{(1-x)(1+x)^2}\;.
\end{align*}$$
Added: To complete the task of finding a closed form for the numbers $a_n$, decompose $A(x)$ into partial fractions. If I’ve made no silly mistakes, it’s
$$A(x)=\frac{1/2}{1-x}+\frac{3/2}{1+x}-\frac1{(1+x)^2}\;.$$
Now write each term on the right as a summation:
$$\begin{align*}
A(x)&=\frac{1/2}{1-x}+\frac{3/2}{1+x}-\frac1{(1+x)^2}\\
&=\frac12\sum_{n\ge 0}x^n+\frac32\sum_{n\ge 0}(-x)^n-\sum_{n\ge 0}(n+1)(-x)^n\\
&=\frac12\sum_{n\ge 0}x^n+\frac32\sum_{n\ge 0}(-1)^nx^n-\sum_{n\ge 0}(-1)^n(n+1)x^n\\
&=\sum_{n\ge 0}\left(\frac12+\frac{3(-1)^n}2-(-1)^n(n+1)\right)x^n\;,
\end{align*}$$
so
$$a_n=\frac12+\frac{3(-1)^n}2-(-1)^n(n+1)=\frac{1+(-1)^n}2+(-1)^{n+1}n\;.$$
Best Answer
Multiply the recurrence formula by $x^n$ and rewrite it like this \begin{eqnarray*} a_n x^n = x \sum_{k=0}^{n-1} a_k x^k \; \; a_{n-k-1} x^{n-k-1} \end{eqnarray*} Now sum on $n$ (starting from $1$) \begin{eqnarray*} \sum_{n=1}^{\infty} a_n x^n = x \sum_{n=1}^{\infty} \sum_{k=0}^{n-1} a_k x^k \; \;a_{n-k-1} x^{n-k-1}. \end{eqnarray*} Invert the sums (Draw your student a grid of the points ... to convince them that the sums interchange as follows) \begin{eqnarray*} \sum_{n=1}^{\infty} a_n x^n = x \sum_{k=0}^{\infty} \sum_{n=k+1}^{\infty} a_k x^k \; \; a_{n-k-1} x^{n-k-1}. \end{eqnarray*} Make the change of variable $m=n-k-1$ & we have \begin{eqnarray*} \sum_{n=1}^{\infty} a_n x^n = x \sum_{k=0}^{\infty} a_k x^k \sum_{m=0}^{\infty} a_{m} x^{m}. \end{eqnarray*} & finally add $1$ to both sides ... none of the above ?