Filling a gap for the benefit of other readers:
$$\begin{align}
(n-1)^2 -2n^2 + (n+1)^2 &= (n^2-2n+1) -2n^2+(n^2+2n+1) \\
&=2n^2-2n^2+2n-2n+2 \\
&=2
\end{align}$$
or:
$$\begin{align}
(n-1)^2 -2n^2 + (n+1)^2 &= ((n+1)^2-n^2) - (n^2-(n-1)^2) \\
&=(n+1+n)(n+1-n) - (n+n-1)(n-(n-1)) \\
&=(2n+1) - (2n-1) \\
&=2
\end{align}$$
or simply "the difference between squares increases by two each time"
And the accumulated number of $2$s from this will be one-third the number of terms involved in these equations, $9996/3$.
Revisiting this, we could use another grouping. The alternative pattern repeat of interest is:
$\begin{align}(n-2)^2+(n-1)^2-2n^2 &= n^2-4n+4 +n^2-2n+1 -2n^2 \\
&=-6n+5
\end{align}$
And the $n$ values here have the form $3k$, giving the full sum as
$$\begin{align}
\sum_{i=1}^{3333}(5-6(3i)) &= 3333\cdot5-18 \frac{3333\cdot 3334}{2} \\
&=3333(5-30006) = 3333\times -30001 \\
&=-99993333
\end{align}$$