I want to find the $g(z) = \frac{z}{(1-z)^2}$ for $z \in \mathbb{C}-\{1\}$. My approach has been to decompose the fraction, i.e. $$\frac{z}{(1-z)^2} = \frac{A}{1-z} + \frac{B}{(1-z)^2} \implies A(1-z) + B = z \iff A = -1 , B = 1 \implies g(z) = - \frac{1}{1-z} + \frac{1}{(1-z)^2}.$$
Now I want to rewrite the sum in terms of power series. The first term becomes $$-\frac{1}{1-z} = - \sum_{k=0}^{\infty} z^k,$$
and the second one I do not know how to get.. This is my problem and I'd like some help. If I restrict the domain to be $|z| > 1$ the second term becomes $$\frac{1}{(1-z)^2} = \sum_{k=-\infty}^{-2}(k+1)z^k.$$
If $|z| < 1$, then we have $\frac{1}{(1-z)^2} = (\sum_{k=0}^{\infty} z^k)^2$, and I do not know how to continue from here. I found an article on MSE, but didn't know how to apply it to my problem and I also don't think it should be that 'complicated' in my exercise.
All help is appreciated. Thanks!
Hint Notice that we can also rewrite $g$ with some simple algebraic manipulation: $$\frac{z}{(1 - z)^2} = -\frac{1 - z}{(1 - z)^2} + \frac{1}{(1 - z)^2} = \frac{1}{(1 - z)^2} - \frac{1}{1 - z} .$$
To write a series for this expression centered at $\{z = 0\}$, we can use the observation $$\frac{1}{(1 - z)^2} = \frac{d}{dz} \left(\frac{1}{1 - z} \right). $$