Solution 1:

\begin{align} z & = \frac 1 w \tag 1 \\[10pt] dz & =\frac{-dw}{w^2} \tag 2 \end{align} $$ \frac{P(z)}{Q(z)} = \frac{P(1/w)}{Q(1/w)} $$ Multiply the top and bottom both by $w^m$ to get a polynomial in $w$ in each of those two places. Since $m\ge n+2$, you get a factor of $w^2$ in the numerator that cancels the $w^2$ in $(2)$.

The zeros of the denominator are now outside the image of the curve $C$ because the transformation $z\mapsto 1/z$ turns the plane inside-out. It also changes the orientation of $C$, thus multiplying the integral by $-1$, and that sign change is canceled by the $-1$ in $(1)$ above. But since the integral ends up being $0$, the sign doesn't matter anyway.

Solution 2:

Since $P(z)$ and $Q(z)$ are polynomials, they are entire. So $\frac{P(z)}{Q(z)}$ is complex differentiable at all points $z$ such that $Q(z) \neq 0$. Since $C$ contains a zero of $Q$, $P/Q$ is not analytic inside $C$. Therefore, you cannot apply Cauchy's integral theorem to deduce $\int_C P(z)/Q(z) \, dz = 0$. However, you may use the residue theorem.

Let $r > 1$ be sufficiently large so that the circle $|z| = r$ contains the all the zeros of $Q$ and

$$\frac{|b_{0}|}{r^m} + \frac{|b_1|}{r^{m-1}} + \cdots + \frac{|b_{m-1}|}{r} < \frac{|b_m|}{2}.$$

Thus

$$|Q(z)| \ge r^m\left(|b_m| - \frac{|b_{m-1}|}{r} - \cdots - \frac{|b_1|}{r^{m-1}} - \frac{|b_0|}{r^m}\right) \ge \frac{|b_m|r^m}{2}$$

for all $z$ on the circle $|z| = r$. Also, on the same circle, $|P(z)| \le C_n r^n$, where $C_n = n \max\{|a_0|,\ldots, |a_n|\}$. By the ML-inequality,

$$\tag{*}\left|\int_{|z| = r} \frac{P(z)}{Q(z)}\, dz\right| \le \frac{4\pi C_n}{|b_m|r^{m-n-1}}.$$ On the other hand, the residue theorem gives

$$ \int_C \frac{P(z)}{Q(z)}\, dz = 2\pi i\sum (\text{residues of $P/Q$}) = \int_{|z| = r} \frac{P(z)}{Q(z)}\, dz.\tag{**}$$

Since $m \ge n + 2$, the expression on the right-hand side of $(*)$ tends to $0$ as $r \to \infty$. Hence by $(**)$,

$$\int_C \frac{P(z)}{Q(z)}\, dz = 0.$$