First, there was a question that stated: $g(x) = \frac{1}{1+x}$, with the power series representation being $\sum_{n=0}^\infty (-1)^nx^n$.
The second question was as follows: find the power series representation for $h(x) = \frac{-1}{(1+x)^2}$.
My method was to define $h(x)$ = $g'(x)$, and I got a power series like $-1+2x-3x^2+...$
My classmate's method was to define $h(x) = -g^2(x)$ and he got something along the lines of $-1+x^2-x^4+...$
As you can tell, these are very different results. Whose method is correct (if any) and what mistake was made?