Note that $$\frac{1}{z^2-1}=\frac{1}{(z-1)(z+1)}$$ Hence, the function $f(z)=\frac{1}{z^2-1}$ has simple poles at $z=\pm 1$. We get $$\mathrm{res}_{z=1}f=\frac{1}{2},\quad\mathrm{res}_{z=-1}f=-\frac{1}{2}$$ For (a) the given contour encloses both poles so you have $$\int_{\gamma_a} \frac{1}{z^2-1}dz = -2\pi i\left(\frac{1}{2}+\frac{-1}{2}\right)=0$$ For (b) the contour is reversed, but also encloses both poles, so $$\int_{\gamma_b} \frac{1}{z^2-1}dz = 2\pi i\left(\frac{1}{2}+\frac{-1}{2}\right)=0$$ For (c) the contour encloses only the pole $z=1$, so $$\int_{\gamma_c} \frac{1}{z^2-1}dz = -2\pi i\cdot\frac{1}{2}=-\pi i$$