This is a solution using differentiation under the integral rather than integration.
Denote the integrand by $F(a,t) = \frac{\sin(xt)(1-\cos(at))}{t^2} $. Then $\frac{\partial}{\partial a}F(a,t) = \frac{\sin(xt)sin(at)}t$. As posted previously, I know that:
$$J = \int_0^{\infty} \frac{\partial}{\partial a}F(a,t) dt = \int_0^{\infty} \frac{\sin(xt)\sin(at)}t dt = \frac12\log\left(\lvert\frac{x-a}{x+a}\rvert\right)$$
converges uniformly on any closed interval of $a$ which does not contain either $x$ or $-x$.
Denote the integral we are trying to evaluate by
$$f(a) = \int_0^{\infty} F(a,t) dt = \int_0^{\infty} \frac{\sin(xt)(1-\cos(at))}{t^2} dt$$
Since the convergence of the integral $J$ is uniform:
$$f'(a) = \int_0^{\infty} \frac{\partial}{\partial a}F(a,t) dt = \frac12\log\left(\lvert\frac{x-a}{x+a}\rvert\right)$$
Hence
$$f(a) = \int \frac12\log\left(\lvert\frac{x-a}{x+a}\rvert\right) da + C = \int \frac14\log\left(\frac{(x-a)^2}{(x+a)^2}\right) da + C$$
Integrating by parts, differentiating $\frac14\log\left(\frac{(x-a)^2}{(x+a)^2}\right)$ and integrating $1$, we get:
$$f(a) = \frac a2\log(|\frac{x-a}{x+a}|)-\frac x2\log(|x^2-a^2|) + C$$
Now we need to compute the constant of integration. Suppose, for simplicity, that $0 \le a < x$. We know that $f(a)$ is valid on this interval. We can easily compute $f(0) = 0$ and determine on this interval that $C = \frac x2\log(x^2)$ and hence for the interval $0 \le a < x$:
$$f(a) = \frac a2\log(|\frac{x-a}{x+a}|)-\frac x2\log(|1-\frac{a^2}{x^2}|)$$
If $0 \le x < a$, then we have to determine the appropriate value for the constant for this new interval. But the problem is determine a value of $a$ for which I can easily compute $f$ in this interval. I think I am going to have to compute $\lim_{a \rightarrow \infty} f(a)$ by taking the limit under the integral.
I think for the interval $0 \le x < a$, we do the same thing as we did for the other interval to compute $C$. If we let $x=0$, then the integral $I= 0$ and we get:
$$f(a) = \frac a2\log(|\frac{-a}{a}|) + C = 0$$
or $C = 0$. Thus
$$f(a) = \frac a2\log(|\frac{x-a}{x+a}|)-\frac x2\log(|x^2-a^2|)$$
It would probably have been better if I wrote $f(a,x)$ rather than $f(a)$.
I have discovered that this second solution is not correct. The first solution holds for all $x$ and $a$. In the limit, the first derivation for $f(a)$ approaches $0$ and $x$ approaches $0$.
The following is the correct solution for the interval $0 \le x < a$. The function
$$f(a) = \int_0^{\infty} \frac{\sin(xt)(1-\cos(at))}{t^2} dt $$
converges uniformly for all $a$ and $x$. Hence $f(a)$ is a continuous function for $a$ in any interval. Previously, we determined that in the interval $0 \le x < a$
$$f(a) = -\frac a2\log(|\frac{x-a}{x+a}|)+\frac x2\log(|x^2-a^2|) + C$$
(after correcting for the missing minus sign), and we were trying to determine the constant of integration $C$. Since $f(a)$ is continuous, we must have that $\lim_{a \rightarrow x^-} f(a) = \lim_{a \rightarrow x^+} f(a)$. Using the solution computed on $0 \le a < x$ on the left side, and the one above on the right, we have
$$\lim_{a \rightarrow x^-} f(a) = x\log(2) = x\log(2) + x\log(|x|) + C = \lim_{a \rightarrow x^+} f(a)$$
and we get $C = -x\log(|x|)$, which is what we computed for the first interval $0 \le a < x$ (again after correcting for the missing minus sign). This result should not be very surprising, since the constant of integration has to be the same on both intervals if the function is to be continuous. So we have for all $a \ne x$:
$$f(a) = -\frac a2\log(|\frac{x-a}{x+a}|)+\frac x2\log(|1-\frac{a^2}{x^2}|)$$
and $f(x)= x\log(2)$.
The reason we had to go through all the trouble of computing solutions on two intervals is because the function $f(a)$ is not differentiable at $a = x$.