Since \(f\) is analytic on \(B_R(z_0)-\{z_0\}\text{,}\) \(z_0\) is an isolated singularity of \(f\text{.}\) Since \(\ord_q(z_0)=1\text{,}\) we have \(q(z)=(z-z_0)g(z)\) where \(g\) is analytic on \(B_R(z_0)\) and \(g(z_0)\ne 0\text{.}\) It follows that \(p/g\) is analytic on \(B_R(z_0)\) and we have
\begin{align*}
f(z) \amp = \frac{1}{z-z_0}\cdot \frac{p(z)}{g(z)} \\
\amp = \frac{1}{z-z_0}\sum_{n=0}^\infty a_n(z-z_0)^n \\
\amp = \frac{1}{z-z_0}(p(0)/g(0)+a_1(z-z_0)+a_2(z-z_0)^2+\cdots)\\
\amp = \frac{p(0)/g(0)}{z}+a_1+a_2(z-z_0)+\cdots \text{.}
\end{align*}
Thus
\begin{equation*}
\ref_f(z_0)=\frac{p(0)}{g(0)}=\frac{p(0)}{q'(0)}\text{,}
\end{equation*}
since \(q'(z)=g(z)+(z-z_0)g'(z)\text{.}\)