[proofplan]
We factor both holomorphic functions at the point $a$ according to their finite zero orders. This writes $p$ and $q$ as powers of $z-a$ times holomorphic nonvanishing factors. After shrinking the neighbourhood so that the nonvanishing factor of $q$ stays nonzero, the quotient is exactly a power of $z-a$ times a holomorphic quotient. The exponent is $0$ when $r=s$, giving a removable singularity, and positive when $r>s$, giving a zero of order $r-s$.
[/proofplan]
[step:Factor both functions by their zero orders at $a$]
By the definition of a zero of order $r$ for $p$ at $a$, equivalently by the standard local factorization theorem for zeros of finite order (citing a result not yet in the wiki: local factorization at a zero of finite order), there exist an open neighbourhood $W_p \subset U$ of $a$ and a [holomorphic function](/page/Holomorphic%20Function) $u: W_p \to \mathbb{C}$ such that $u(a) \ne 0$ and
\begin{align*}
p(z) = (z-a)^r u(z) \quad \text{for every } z \in W_p.
\end{align*}
Likewise, since $q$ has a zero of order $s$ at $a$, there exist an open neighbourhood $W_q \subset U$ of $a$ and a holomorphic function $v: W_q \to \mathbb{C}$ such that $v(a) \ne 0$ and
\begin{align*}
q(z) = (z-a)^s v(z) \quad \text{for every } z \in W_q.
\end{align*}
[/step]
[step:Shrink the neighbourhood so that the remaining denominator does not vanish]
Because $v: W_q \to \mathbb{C}$ is holomorphic, it is continuous. Since $v(a) \ne 0$, there exists an open neighbourhood $W \subset W_p \cap W_q$ of $a$ such that
\begin{align*}
v(z) \ne 0 \quad \text{for every } z \in W.
\end{align*}
For every $z \in W \setminus \{a\}$, we also have $(z-a)^s \ne 0$. Hence
\begin{align*}
q(z) = (z-a)^s v(z) \ne 0 \quad \text{for every } z \in W \setminus \{a\}.
\end{align*}
Thus the quotient function $p/q: W \setminus \{a\} \to \mathbb{C}$ is well-defined.
[/step]
[step:Cancel the common factor on the punctured neighbourhood]
Define the function $h: W \to \mathbb{C}$ by
\begin{align*}
h(z) = \frac{u(z)}{v(z)}.
\end{align*}
Since $u$ and $v$ are holomorphic on $W$ and $v$ is nonvanishing on $W$, the quotient theorem for holomorphic functions with nonvanishing denominator implies that $h$ is holomorphic on $W$ (citing a result not yet in the wiki: quotient of holomorphic functions with nonvanishing denominator is holomorphic). For every $z \in W \setminus \{a\}$, cancellation gives
\begin{align*}
\frac{p(z)}{q(z)} = \frac{(z-a)^r u(z)}{(z-a)^s v(z)} = (z-a)^{r-s} h(z).
\end{align*}
[guided]
The point of the factorization is that all possible singular behaviour of $p/q$ at $a$ is contained in the explicit powers of $z-a$. We have already chosen the neighbourhood $W$ so that $v(z) \ne 0$ for every $z \in W$, and therefore the quotient of the remaining factors is harmless.
Define the map $h: W \to \mathbb{C}$ by
\begin{align*}
h(z) = \frac{u(z)}{v(z)}.
\end{align*}
The quotient theorem for holomorphic functions applies here because $u: W \to \mathbb{C}$ and $v: W \to \mathbb{C}$ are holomorphic, and because the denominator satisfies $v(z) \ne 0$ for every $z \in W$. Hence $h$ is holomorphic on all of $W$.
Now take any point $z \in W \setminus \{a\}$. At such a point, both $(z-a)^s$ and $v(z)$ are nonzero, so division by $q(z)=(z-a)^s v(z)$ is legitimate. Using the two factorizations,
\begin{align*}
\frac{p(z)}{q(z)} = \frac{(z-a)^r u(z)}{(z-a)^s v(z)}.
\end{align*}
Since $r \ge s$, the exponent $r-s$ is a nonnegative integer, and ordinary algebra gives
\begin{align*}
\frac{p(z)}{q(z)} = (z-a)^{r-s} h(z).
\end{align*}
This identity is the whole cancellation mechanism: after removing the common factor $(z-a)^s$, what remains is a holomorphic function multiplied by a nonnegative power of $z-a$.
[/guided]
[/step]
[step:Define the removable extension when the two zero orders are equal]
Assume $r=s$. Then $r-s=0$, so for every $z \in W \setminus \{a\}$,
\begin{align*}
\frac{p(z)}{q(z)} = h(z).
\end{align*}
Since $h: W \to \mathbb{C}$ is holomorphic, the function $p/q$ on $W \setminus \{a\}$ extends holomorphically to $W$ by assigning the value
\begin{align*}
\left(\frac{p}{q}\right)(a) := h(a) = \frac{u(a)}{v(a)}.
\end{align*}
Therefore the singularity of $p/q$ at $a$ is removable.
[/step]
[step:Define the extension and compute its zero order when the numerator vanishes to higher order]
Assume $r>s$. Define the function $F: W \to \mathbb{C}$ by
\begin{align*}
F(z) = (z-a)^{r-s} h(z).
\end{align*}
The map $z \mapsto (z-a)^{r-s}$ is a polynomial function on $W$, hence holomorphic, and $h$ is holomorphic on $W$. Therefore $F$ is holomorphic on $W$. By the cancellation identity above, $F(z)=p(z)/q(z)$ for every $z \in W \setminus \{a\}$, so $F$ is a holomorphic extension of $p/q$ to $W$.
It remains to compute the zero order at $a$. Since $u(a) \ne 0$ and $v(a) \ne 0$,
\begin{align*}
h(a) = \frac{u(a)}{v(a)} \ne 0.
\end{align*}
Thus $F$ has the factorization
\begin{align*}
F(z) = (z-a)^{r-s} h(z)
\end{align*}
on $W$, where $h$ is holomorphic and nonzero at $a$. By the definition of zero of finite order, $F$ has a zero of order $r-s$ at $a$. This proves the claimed extension and zero order.
[/step]