I have the function: $$ f(z) = \frac{z^2 + 1}{z(1-z)}$$
Which I have to show that it is analytic on $\mathbb{C}\setminus \{0,1\}$ (from definition) so I must write it in the form: $$\sum_n a_n (z-z_0)^n$$
I can't use the fact that it is holomorphic because we haven't taken that rule yet.
I have managed to write $f$ as: $$f(z) = 1 - \frac{1}{z} + 2\frac{1}{1-z}$$
Then $$\frac{1}{z} = \frac{1}{z_0\left(1 + \frac{z-z_0}{z_0}\right)} = \frac{1}{z_0}\sum_n \left(\frac{z-z_0}{z_0}\right)^n$$ using the property of geometric series, and: $$\frac{1}{1-z} = \sum_n z^n$$ also using the geometric series property.
So I end up with: $$f(z) = 1 - \frac{1}{z_0}\sum_n \left(\frac{z-z_0}{z_0}\right)^n + 2\sum_n z^n$$
That's the closest I got to an answer.
Any help on this question is much appreciated
In your partial fraction decomposition you've made a mistake, actually
$$f(z) = -1 + \frac{1}{z} + \frac{2}{1-z}.$$
That doesn't touch the essence of the matter, however.
You started well, but then you expanded $\frac{1}{1-z}$ about the centre $0$ instead of $z_0$. Just write
$$\frac{1}{1-z} = \frac{1}{(1 - z_0) - (z-z_0)} = \frac{1}{1-z_0}\cdot \frac{1}{1-\frac{z-z_0}{1-z_0}}$$
and expand the latter in a geometric series (that converges for $\lvert z-z_0\rvert < \lvert 1-z_0\rvert$).