Stefan A. Burr's paper "On Uniform Elementary Estimates of Arithmetic Sums" has this result:
Suppose $G(s)=\sum_{n=1}^{\infty}\frac{g(n)}{n^s},$ $G_2(s)=|g(1)|+\sum_{n=2}^{\infty}\frac{|g(n)|\log{n}}{n^s},$
and define $\tau_r(n)$ to be the number of ways $n$ can be expressed as a product of $r$ factors. Let $f$ be an arithmetic function and let $g$ be such that,
$f(n)=\sum_{d|n}g(d)\tau_r(\frac{n}{d}),$
with $r\geq2$ and suppose that $G_2(1)$ exists. Then,
$\sum_{n\leq{x}}f(n)=\frac{1}{(r-1)!}G(1)x\log^{r-1}x+O\Big(G_2(1)x\log^{r-2}x\Big).$
Burr then states for $r=2$, using the average order of the divisor function:
$\sum_{n\leq{x}}\tau_2(n)=x\log{x}+(2\gamma-1)x+O(x^{1/2}),$
that with "a little work" we may find:
$\sum_{n\leq{x}}f(n)=G(1)x\log{x}+(G'(1)+(2\gamma-1)G(1))x+$E(x),
with $|$E(x)$|\leq8G_2(\alpha)x^{\alpha}$ for all $x\geq1$ and all $\alpha\leq1$ for which $G_2(\alpha)$ exists.
I want to understand how he has found the bound for the error term E(x). I have reached this step:
$\sum_{n\leq{x}}f(n)=G(1)x\log{x}+(G'(1)+(2\gamma-1)G(1))x-x\log{x}\sum_{d>x}\frac{g(d)}{d}+x\sum_{d>x}\frac{g(d)\log{d}}{d}-(2\gamma-1)x\sum_{d>x}\frac{g(d)}{d}+O(x^{1/2}\sum_{d\leq{x}}\frac{g(d)}{d^{1/2}}).$
I am now unsure what steps Burr takes to reduce these excess sums into the simple error term. Any help would be much appreciated.