Mathematica (as of v. 11.1.0) does not recognize that this special case of Frullani's integral converges:
Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0, Infinity}]
(* Integrate::idiv: Integral of ArcTan[a x]/x-ArcTan[b x]/x does not converge
on {0,\[Infinity]}.
Integrate[(ArcTan[a*x] - ArcTan[b*x])/x, {x, 0, Infinity}] *)
This should converge because the integrand is well-defined at zero and is $ O(1/x^2)$ as $ x \to \infty $.
Using the formula given, with $ f(x) = \tan^{-1} (x) $, we should have
$$ \int_0^\infty dx\,\frac{\tan^{-1}(a\,x)-\tan^{-1}(b\,x)}{x} = -\frac{\pi}{2} \ln \left(\frac{b}{a}\right) $$
NIntegrate
crunches through just fine for $ a = 1 $ and $ b = 2 $.
NIntegrate[(ArcTan[1*x] - ArcTan[2*x])/x, {x, 0, Infinity}]
(* -1.08879 *)
This matches the exact result:
-(Pi/2)*Log[2/1] // N
(* -1.08879 *)