Asymptotics of $\sum _{n \leq x}\sigma_{-2}(n)$ It is known that the sum of the squared inverses of the divisors satisfies $$\sum _{n \leq x} \sigma_{-2}(n) = \zeta(3)x + \mathcal O(1).$$ On the other hand, an alternate calculation gives me another answer:
$$\begin{align*} 
\sum _{n \leq x} \sigma_{-2}(n) &=    \sum _{a \leq x} \sum _{b \leq \frac xa} \frac 1{b^2}\\
& = \sum _{a \leq x} \left( -\frac ax + \zeta (2) + \mathcal O(\frac {a^2} {x^2})  \right) \\
&=   -\frac 1x \left(\frac 12 x^2+ \mathcal O (x)\right) + \zeta(2)x + \frac 1 {x^2}\mathcal  O (\sum _{a \leq x }a^2)\\
&= -\frac 12 x  + \mathcal O(1) +\zeta(2) x + \frac 13 x + \mathcal O(1).
\end{align*}$$
And this is a contradiction. I cannot spot the error in my calculation. Where did it go wrong?
Proof of known asymptotic
$$\begin{align*} 
\sum _{n \leq x} \sigma_{-2}(n) &=    \sum _{a \leq x} \frac 1{a^2} \sum _{b \leq \frac xa} 1\\
& = \sum _{a \leq x} \frac 1 {a^2} \left(\frac xa + \mathcal O(1)\right) \\
&=   x \sum_{a \leq x }\frac 1 {a^3} + \mathcal O(\sum _{a \leq x} \frac 1 {a^2}) \\&=  \zeta(3)x + \mathcal O(1).
\end{align*}$$

You are tacitly assuming that a constant is $1$, while that is not the case.
$$ \sum_{b\leq N}\frac{1}{b^2} = \zeta(2)-\frac{1}{N}+\frac{1}{2N^2}-\frac{1}{6N^3}+\frac{1}{30N^5}+\ldots $$
hence by replacing $N$ with $\frac{x}{a}$ we get
$$ \sum_{b\leq\frac{x}{a}}\frac{1}{b^2} = \zeta(2)-\frac{a}{x}+\frac{a^2}{2x^2}-\frac{a^3}{6x^3}+\frac{a^5}{30x^5}+\ldots $$
and summing both sides over $a\leq x$ we have
$$ \sum_{a\leq x}\sum_{b\leq\frac{x}{a}}\frac{1}{b^2} = x\left(\zeta(2)-\frac{1}{2}+\frac{1}{6}-\frac{1}{24}+\frac{1}{180}+\ldots\right)+\mathcal{O}(1) $$
where by the Euler-Maclaurin summation formula the involved constant is
exactly $\zeta(3)$ and not $\zeta(2)-\frac{1}{6}$.
