I'm new to Discrete mathemathics, in particular in generating functions. This is probably easy to determinate. However I'm having trouble.
For $a_n=\frac{n+1}{(-2)^n}$, and $b_n=\frac{n+1}{3^n}$
$$A(x)=\sum_{n=0}^{\infty} a_nx^n $$ $$B(x)=\sum_{n=0}^{\infty} b_nx^n $$
Let $A(x)$ and $B(x)$ be the generating functions of $a_n$ and $b_n$.
Determinate $A(x)$ and $B(x)$.
The solution of the exercise is: $A(x)=\frac{4}{(x+2)^2} $ and $B(x)=\frac{9}{(3-x)^2}$
Hint. As you probably know, the generating function of the constant sequence $(1)_{n\geq 0}$ is $\frac{1}{1-x}$.
By differentiating it, we obtain $$\frac{1}{(1-x)^2}=\frac{d}{dx}\left(\frac{1}{1-x}\right)=\frac{d}{dx}\left(\sum_{n\geq 0}x^n\right)=\sum_{n\geq 1}nx^{n-1}=\sum_{n\geq 0}(n+1)x^{n}.$$ Then $$A(x)=\sum_{n=0}^{\infty} \frac{n+1}{(-2)^n}x^n=\sum_{n=0}^{\infty} (n+1)(-x/2)^n.$$ Can you take it from here? What about $B(x)$?