The following is just a speeded-up version of the answer by Davide Giraudo.
Let $f(x)$ be a real-valued function defined for $x\geq 0$. Suppose that $f(x)$ is Riemann integrable on every bounded interval of nonnegative real numbers, that $f(x)$ is continuous at $x=0$, and that the limit $f(\infty):=\lim_{x\to\infty} f(x)$ exists (as a finite quantity). If $a>0$ and $b>0$, then the integral \begin{equation*} \int_{\,0}^{\,\infty} \frac{f(ax)-f(bx)}{x} dx \tag{1} \end{equation*} exists and is equal to $\bigl(f(\infty)-f(0)\bigr)\,\ln(a/b)$.
The assertion that the integral $(1)$ exists means that the following limit exists, \begin{equation*} \lim_{l\to0,\,h\to\infty} \int_{\,l}^{\,h} \frac{f(ax)-f(bx)}{x} dx \end{equation*} where $l$ approaches $0$ independently of $h$ approaching $\infty$, and that this limit is the integral $(1)$.
Proof.$\,$ Assume that $a\geq b\,$; this does not lose us any generality. Let $0. The change of variables $ax=by$ shows that \begin{equation*} \int_{\,l/a}^{\,h/a}\frac{f(ax)}{x}dx ~=~ \int_{\,l/b}^{\,h/b}\frac{f(by)}{y}dy~, \end{equation*} so we have \begin{align*} \int_{\,l/a}^{\,h/a}\frac{f(ax)-f(bx)}{x}dx &~=~ \int_{\,l/b}^{\,h/b}\frac{f(bx)}{x}dx ~-~ \int_{\,l/a}^{\,h/a}\frac{f(bx)}{x}dx \\ &~=~ \int_{\,h/a}^{\,h/b}\frac{f(bx)}{x}dx ~-~ \int_{\,l/a}^{\,l/b}\frac{f(bx)}{x}dx~; \end{align*} we write the difference in the second line as $I(h) - I(l)$.
Let $\varepsilon>0$. There exists $l_\varepsilon>0$ such that $f(0)-\varepsilon\leq f(bx)\leq f(0)+\varepsilon$ for $0\leq x\leq l_\varepsilon/b$. Since by assumption $l/a\leq l/b$ for every $l>0$, we obtain the estimate \begin{equation*} \int_{\,l/a}^{\,l/b}\frac{f(0)-\varepsilon}{x}dx ~\leq~ I(l) ~\leq~ \int_{\,l/a}^{\,l/b}\frac{f(0)+\varepsilon}{x}dx \qquad\qquad \text{for $0}~, \end{equation*} that is, \begin{equation*} \bigl(f(0)-\varepsilon\bigr)\,\ln\frac{a}{b} ~\leq~ I(l) ~\leq~ \bigl(f(0)+\varepsilon\bigr)\,\ln\frac{a}{b} \qquad\qquad \text{for $0}~. \end{equation*} In other words, $I(l)$ converges to $f(0)\,\ln(a/b)$ as $l$ approaches $0$. In the same way we see that $I(h)$ converges to $f(\infty)$ as $h$ approaches $\infty$.$\,$ Done.