Given the sequence $a_n$, where $n$-th element is $a_n = (-3)^n$
I have the generating function $$A(t) = \sum_{n=0}^{\infty} (-3)^nt^n $$
The problem now is to simplify the obtained expression.
I did the following:
Let $B(t) = -3t$ be the generating function and $C(B(t)) = A(t) = \sum_{n=0}^{\infty} (-3)^nt^n $. Hence, the generating function $C(t) = \sum_{n=0}^{\infty} t^n = \frac{1}{1 - t}$
Therefore $$A(t) = C(B(t)) = C(-3t) = \frac{1}{1 + 3t}$$
Is this a possible way to solve this problem?
You could simply notice that $\sum_{n=0}^\infty(-3)^nt^n$ is a convergent geometric series with ratio $-3t$ for $\|3t\|< 1$.
The closed form of geometric series with ratio $r$, where $\|r\| < 1$, is $$ \sum_{n=0}^\infty r^n = \frac{1}{1-r}. $$