Uncertain how the following step was accomplished. I'm working through a book example that aims to find the first two nonzero terms of the Laurent expansion of $f(z)=\tan(z)$, about $z=\frac{\pi}{2}$.
The substitution $z=\frac{\pi}{2}+u$ is made
$$f(z)=\frac{\sin(\frac{\pi}{2}+u)}{\cos(\frac{\pi}{2}+u)}=-\frac{\cos(u)}{\sin(u)}$$
The respective Taylor series are then utilized
$$f(z)=-\frac{(1-\frac{u^2}{2!}+ \cdots)}{(u-\frac{u^3}{3!}+ \cdots)}=-\frac{1}{u}\frac{(1-\frac{u^2}{2!}+ \cdots)}{(1-\frac{u^2}{3!}+ \cdots)}$$
Now here is where I get lost. The book then states that it is using
$$\frac{1}{1-z}=\sum_{n=0}^{\infty} z^{n} \quad for \quad|z|<1$$
To expand the denominator into the following
$$f(z)=-\frac{1}{u}(1-\frac{u^2}{2!}+ \cdots)(1+\frac{u^2}{3!}+ \cdots)$$
I cannot seem to pick up on the math going on above. Would anyone care to enlighten me?

Here we do a geometric series expansion
\begin{align*}
\frac{1}{1-u}&=\sum_{n=0}^{\infty}u^n\\
&=1+u+u^2+u^3+\cdots \qquad\qquad\qquad\qquad\qquad |u|<1
\end{align*}
If we substitute $h(u)$ for $u$ we obtain
\begin{align*}
\frac{1}{1-h(u)}&=\sum_{n=0}^{\infty}\left(h(u)\right)^n\\
&=1+h(u)+\left(h(u)\right)^2+\left(h(u)\right)^3+\cdots\qquad\qquad |h(u)|<1
\end{align*}

In the series expansion of $f(u)=-\frac{\cos(u)}{\sin(u)}$ we are in a similar situation
\begin{align*}
f(u)&=-\frac{\left(1-\frac{u^2}{2!}+\frac{u^4}{4!}- \cdots\right)}{\left(u-\frac{u^3}{3!}+ \frac{u^5}{5!}-\cdots\right)}\\
&=-\frac{1}{u}\frac{\left(1-\frac{u^2}{2!}+ \frac{u^4}{4!}-\cdots\right)}{\left(1-\frac{u^2}{3!}+  \frac{u^4}{5!}-\cdots\right)}\\
&=-\frac{1}{u}\left(1-\frac{u^2}{2!}+\frac{u^4}{4!}-\cdots\right)\frac{1}{(1-h(u))}
\qquad\text{with}\qquad h(u)=\frac{u^2}{3!}- \frac{u^4}{5!}+\cdots\\
&=-\frac{1}{u}\left(1-\frac{u^2}{2!}+\frac{u^4}{4!}-\cdots\right)\left(1+h(u)+(h(u))^2+\cdots\right)\\
&=-\frac{1}{u}\left(1-\frac{u^2}{2!}+\frac{u^4}{4!}-\cdots\right)\\
&\qquad\cdot\left(1+\underbrace{\left(\frac{u^2}{3!}+  \frac{u^4}{5!}-\cdots\right)}_{h(u)}
+ \underbrace{\left(\frac{u^2}{3!}+  \frac{u^4}{5!}-\cdots\right)^2}_{\left(h(u)\right)^2}+\cdots\right)\\
&=-\frac{1}{u}\left(1-\frac{u^2}{2!}+\cdots\right)\left(1+\frac{u^2}{3!}+ \cdots\right)\\
\end{align*}

