It can be solved using differentiation under the integral sign. Consider the following integral:
\begin{equation}
I(t)=\int\limits_{-\infty}^{+\infty} \frac{\cos(tx)}{x^{2}+k} \,dx = 2\int\limits_{0}^{+\infty} \frac{\cos(tx)}{x^{2}+k} \,dx
\end{equation}
for any positive real $t$ and $k$. The first derivative with respect to $t$ is:
\begin{equation}
I'(t)= -2\int\limits_{0}^{+\infty} \frac{x\sin(tx)}{x^{2}+k} \,dx
\end{equation}
\begin{equation}
\Leftrightarrow \hspace{.3cm}I'(t)= -2\int\limits_{0}^{+\infty} \frac{x^{2}\sin(tx)}{x(x^{2}+k)} \,dx
\end{equation}
\begin{equation}
\Leftrightarrow \hspace{.3cm}I'(t)= -2\int\limits_{0}^{+\infty} \frac{(x^{2}+k-k)\sin(tx)}{x(x^{2}+k)} \,dx
\end{equation}
\begin{equation}
\Leftrightarrow \hspace{.3cm}I'(t)= -2\int\limits_{0}^{+\infty} \frac{\sin(tx)}{x} \,dx +2k\int\limits_{0}^{+\infty} \frac{\sin(tx)}{x(x^{2}+k)} \,dx
\end{equation}
The first one is just the sine integral as $x\rightarrow \infty$ and it is known to converge to $\frac{\pi}{2}$. Thus:
\begin{equation}
I'(t)= 2k\int\limits_{0}^{+\infty} \frac{\sin(tx)}{x(x^{2}+k)} \,dx -\pi
\end{equation}
Differentiating once more with respect to $t$ yields:
\begin{equation}
I''(t)= 2k\int\limits_{0}^{+\infty} \frac{\cos(tx)}{x^{2}+k} \,dx
\end{equation}
\begin{equation}
\Leftrightarrow \hspace{.3cm}I''(t)-kI(t)=0
\end{equation}
The general solution to the ODE is:
\begin{equation}
I(t)=c_{1}e^{\sqrt{k}t}+c_{2}e^{-\sqrt{k}t}
\end{equation}
Plugging some conditions $\left(I(t=0) \,\,\text{and}\,\, I'(t=0)\right)$ allows you to find that $c_{1}=0$ and that $c_{2}=\frac{\pi}{\sqrt{k}}$. Then:
\begin{equation}
\boxed{\int\limits_{-\infty}^{+\infty} \frac{\cos(tx)}{x^{2}+k} \,dx = \frac{\pi}{\sqrt{k}}e^{-\sqrt{k}t}}
\end{equation}
for positive real values of $t$ and $k$. If you plug $t=2$ and $k=4$, you obtain the desired result.
Best Answer
One route to evaluating the integral is $$-\int_0^\infty \ln(1-e^{-x})dx=\int_0^\infty\left(e^{-x}+\frac{e^{-2x}}{2}+\frac{e^{-3x}}{3}+\cdots\right)dx $$ $$=\int_0^\infty e^{-x}dx+\frac{1}{2}\int_0^\infty e^{-2x}dx+\frac{1}{3}\int_0^\infty e^{-3x}dx+\cdots$$ $$=1+\frac{1}{2}\cdot\frac{1}{2}+\frac{1}{3}\cdot\frac{1}{3}+\frac{1}{4}\cdot\frac{1}{4}\cdots $$ $$=\zeta(2)=\frac{\pi^2}{6}.$$
I don't know if a straightforward substitution could get you the answer, what with this being the Riemann zeta function and all, but you can see the integrals on the linked page and try your own hand at finding one. (Or someone else can try their hand.)