$$
\begin{align}
\int_{ma}^{na}\frac{\log(x-a)}{x^2+a^2}\,\mathrm{d}x
&=\frac1a\int_m^n\frac{\log(a)+\log(x-1)}{x^2+1}\,\mathrm{d}x\tag{1}\\
&=\frac{\log(a)}a\Big[\arctan(n)-\arctan(m)\Big]\\
&+\frac1a\int_m^n\frac{\log(x-1)}{x^2+1}\,\mathrm{d}x\tag{2}\\
&=\frac{\log(a)}a\Big[\arctan(n)-\arctan(m)\Big]\\
&+\frac1{a\sqrt2}\int_{\log\left(\frac{m-1}{\sqrt2}\right)}^{\log\left(\frac{n-1}{\sqrt2}\right)}\frac{\color{#C00000}{u}+\color{#00A000}{\log(\sqrt2)}}{e^{2u}+\sqrt2e^u+1}e^u\,\mathrm{d}u\tag{3}\\
&=\frac{\log(a)}a\Big[\arctan(n)-\arctan(m)\Big]\\
&+\frac1{a\sqrt2}\int_{\log\left(\frac{m-1}{\sqrt2}\right)}^{\log\left(\frac{n-1}{\sqrt2}\right)}\frac{\log(\sqrt2)}{e^{2u}+\sqrt2e^u+1}e^u\,\mathrm{d}u\tag{4}\\
&=\frac{\log(a)}a\Big[\arctan(n)-\arctan(m)\Big]\\
&+\frac{\log(\sqrt2)}{a}\int_m^n\frac{\mathrm{d}x}{x^2+1}\tag{5}\\
&=\frac{\log(a)}a\Big[\arctan(n)-\arctan(m)\Big]\\
&+\frac{\log(\sqrt2)}{a}\Big[\arctan(n)-\arctan(m)\Big]\tag{6}\\
&=\frac{\log(a\sqrt2)}a\Big[\arctan(n)-\arctan(m)\Big]\tag{7}
\end{align}
$$
Justificación:
$(1)$: sustituto $x\mapsto ax$
$(2)$: integrar la $\log(a)$ plazo
$(3)$: sustituto $u=\log\left(\frac{x-1}{\sqrt2}\right)$
$(4)$: $\log\left(\frac{n-1}{\sqrt2}\right)+\log\left(\frac{m-1}{\sqrt2}\right)=0$; $\frac{e^u}{e^{2u}+\sqrt2e^u+1}$ es incluso; lo curioso: $\color{#C00000}{u}$
$(5)$: revertir la sustitución de $(3)$
$(6)$: integrar
$(7)$: combinar
\begin{align}
\int_{a/m}^{a/n}\frac{\log(x+a)}{x^2+a^2}\,\mathrm{d}x
&=\int_{m/a}^{n/a}\frac{\log(1+ax)-\log(x)}{1+a^2x^2}\,\mathrm{d}x\tag{8}\\
&=\frac1a\int_m^n\frac{\log(1+x)-\log(x)+\log(a)}{1+x^2}\,\mathrm{d}x\tag{9}\\
&=\frac{\log(a)}{a}\Big[\arctan(n)-\arctan(m)\Big]\\
&+\frac1a\int_m^n\frac{\log(1+x)-\log(x)}{1+x^2}\,\mathrm{d}x\tag{10}\\
&=\frac{\log(a)}{a}\Big[\arctan(n)-\arctan(m)\Big]\\
&+\frac1{a\sqrt2}\int_{\log\left(\frac{m-1}{\sqrt2}\right)}^{\log\left(\frac{n-1}{\sqrt2}\right)}\frac{\log\left(\frac{2+\sqrt2e^u}{1+\sqrt2e^u}\right)}{e^{2u}+\sqrt2e^u+1}e^u\,\mathrm{d}u\tag{11}\\
&=\frac{\log(a)}{a}\Big[\arctan(n)-\arctan(m)\Big]\\
&+\frac1{a\sqrt2}\int_{\log\left(\frac{m-1}{\sqrt2}\right)}^{\log\left(\frac{n-1}{\sqrt2}\right)}\frac{\log(\sqrt2)}{e^{2u}+\sqrt2e^u+1}e^u\,\mathrm{d}u\tag{12}\\
&=\frac{\log(a\sqrt2)}a\Big[\arctan(n)-\arctan(m)\Big]\tag{13}
\end{align}
Justificación:
$\ \:(8)$: sustituto $x\mapsto1/x$
$\ \:(9)$: sustituto $x\mapsto x/a$
$(10)$: integrar la $\log(a)$ plazo
$(11)$: sustituto $u=\log\left(\frac{x-1}{\sqrt2}\right)$
$(12)$: $\log\left(\frac{n-1}{\sqrt2}\right)+\log\left(\frac{m-1}{\sqrt2}\right)=0$; $\frac{e^u}{e^{2u}+\sqrt2e^u+1}$ es incluso; incluso parte de $\log\left(\frac{2+\sqrt2e^u}{1+\sqrt2e^u}\right)$ $\log(\sqrt2)$
$(13)$: $(12)$ es el mismo que $(4)$
Motivación:
Puesto que la condición dada es $(n-1)(m-1)=2$, elegí la sustitución de $u=\log\left(\frac{x-1}{\sqrt2}\right)$, por lo que el $[m,n]$ es asignado a un intervalo simétrico con respecto al origen. Entonces podemos ignorar la extraña parte de el integrando. Si tenemos suerte, incluso la parte de el integrando es más fácil de manejar.