Denote $f(z)=\dfrac{1}{1+z^2}$. Consider the anticlockwise contour along the boundary of the rectangle: $-R\stackrel{C_1}{\to} R\stackrel{C_2}{\to} R+i\sqrt{b}\stackrel{C_3}{\to} -R+i\sqrt{b}\stackrel{C_4}{\to} -R$, where $C_i$ $i=1,\dots,4$ are the four oriented edges of the rectangle. Denote $I_i=\int_{C_i}f(z)dz$, $i=1,\dots,4$ and $I=\int_{-\infty}^\infty\frac{1-b+x^2}{(1-b+x^2)^2+4bx^2}d x.$ Express $z$ as $x+iy$. Then $I_1=\int_{-R}^R\frac{1}{1+x^2}d x$, $I_2=\int_{0}^\sqrt{b}\frac{i}{1+(R+iy)^2}d y$, $I_4=-\int_{0}^\sqrt{b}\frac{i}{1+(-R+iy)^2}d y$ and $I_3=-\int_{-R}^R\frac{1}{1+(x+i\sqrt{b})^2}d x=-\int_{-R}^R\frac{1-b+x^2}{(1-b+x^2)^2+4bx^2}d x.$ Note that $\lim\limits_{R\to\infty}I_2=\lim\limits_{R\to\infty}I_4=0$ and $I=-\lim\limits_{R\to\infty}I_3$.
Since $f$ is holomorphic on $\mathbb{C}\setminus\{\pm i\}$, when $0, $f$ is holomorphic on the closure of the rectangle. By Cauchy's integral theorem, $\sum_{i=1}^4 I_i=0$. Therefore, $I=-\lim_{R\to\infty}I_3=\lim_{R\to\infty}I_1=\int_{-\infty}^\infty\frac{1}{1+x^2}d x=\pi.$
When $b>1$, there is a simple pole $i$ inside the rectangle, so by Cauchy's integral formula, $\sum_{i=1}^4 I_i=\pi$. It follows that $I=-\lim_{R\to\infty}I_3=-(\pi-\lim_{R\to\infty}I_1)=0.$