An alternative to @martycohen's approach, using derivatives. I think that if I didn't have to write out details about the Kronecker delta, this might be shorter than Marty's, but I can't promist that.
Both sides are evidently quadratics in the $x_i$ variables, with no constant terms. That is to say, they have the form
$$
H = (\sum_{ij} c_{ij} x_i x_j ) + \sum_i e_i x_i
$$
If we differentiate such a thing with respect to $x_k$, we get
$$
\frac{\partial H}{\partial x_k} = (\sum_i c_{ik} x_i + \sum_j c_{kj} x_j) + e_k,
$$
and if we set all the $x_i$ to zero, we get just $e_k$. Similarly, if we differentiate twice, we can find $c_{kp}$. By comparing these for the two sides, we'll see the two quadratics are equal.
The derivative of $x_i$ with respect to $x_k$ is $\delta_{ik} = \begin{cases} 1 & i = k\\ 0 & i \ne k \end{cases}$, and $\sum_i x_i \delta_{ik} = x_k$, which we'll use frequently in various forms. Also note that
$$
\tag{sum-j}
\sum_{i =1}^n \sum_{j = i+1}^n \delta_{jk} = k-1,
$$
because the inner sum is either $0$ or $1$; it's $1$ whenever $k > i$. This occurs, in the outer sum, for $i = 1, 2, \ldots, k-1$, i.e., $k-1$ times. Similarly,
$$
\tag{sum-i}
\sum_{i =1}^n \sum_{j = i+1}^n \delta_{ik} = n-k.
$$
Finally,
$$
\tag{sum-pk}
\sum_{i =1}^n \sum_{j = i+1}^n \delta_{ik}\delta_{jp} =
\sum_{j = k+1}^n \delta_{jp}
= \delta_{k < p},
$$
by which I mean the sum is $1$ if $k < p$, and $0$ otherwise.
Returning to the main equation, and calling the left and right-hand expressions $L$ and $R$, we'll check first to see that the linear-term coefficient of $x_k$ is identical in both.
The derivative of the LHS with respect to $x_k$ is
\begin{align}
\frac{\partial L}{\partial x_k} &= \sum_{i=1}^n \sum_{j = i+1}^n \frac{\partial \left((x_{j}-x_{i})-(x_{j}-x_{i})^2\right) } {\partial x_k}\\
& = \sum_{i=1}^n \sum_{j = i+1}^n \left((\delta_{jk}-\delta_{ik})-2(x_{j}-x_{i})(\delta_{jk}-\delta_{ik})\right)
\end{align}
Evaluated when all the $x_i$ are zero, we get
\begin{align}
\frac{\partial L}{\partial x_k}(0,0,\ldots, 0)
& = \sum_{i=1}^n \sum_{j = i+1}^n (\delta_{jk}-\delta_{ik})\\
& = \sum_{i=1}^n \sum_{j = i+1}^n \delta_{jk}-\sum_{i=1}^n \sum_{j = i+1}^n\delta_{ik}\\
& = (k-1) - (n-k) & \text{by sum-i and sum-j above} \\
&= -n + 2k - 1.
\end{align}
The derivative of the right-hand side is
\begin{align}
\frac{\partial R}{\partial x_k}
&= \frac{\partial \biggl[ \big(\sum_{i=1}^n{x_i}\big)^2-n\sum_{i=1}^n{x_i^2} - \sum_{i=1}^n{(n-2i+1)x_i}\biggr]}{\partial x_k}\\
&= 2\big(\sum_{i=1}^n{x_i}\big) \sum_{i=1}^n \delta_{ik} -n \frac{\partial \sum_{i=1}^n{x_i^2}}{\partial x_k} - \frac{\partial \sum_{i=1}^n{(n-2i+1)x_i}}{\partial x_k} \\
&= 2\big(\sum_{i=1}^n{x_i}\big)
-n \biggl[ \sum_{i=1}^n{2x_i \delta_{ik}} \biggr]
- \sum_{i=1}^n {(n-2i+1)\delta_{ik}} \\
&= 2\big(\sum_{i=1}^n{x_i}\big)
-2n x_k
- {(n-2k+1)} \\
\end{align}
When $x_1 = x_2 = \ldots = x_n = 0$, we again get a value of $-(n-2k + 1) = -n + 2k - 1$. So the linear terms on the two sides are equal.
Now let's look at the second derivatives. We have
\begin{align}
\frac{\partial^2 L}{\partial x_k \partial x_p}
& = \sum_{i=1}^n \sum_{j = i+1}^n \left(-2(\delta_{jp}-\delta_{ip})(\delta_{jk}-\delta_{ik})\right)\\
& = -2 \sum_{i=1}^n \sum_{j = i+1}^n
\delta_{jp}\delta_{jk} - \delta_{jp}\delta_{ik}-\delta_{ip}\delta_{jk} + \delta_{ip}\delta_{ik}
\end{align}
First consider the case $k = p$:
\begin{align}
\frac{\partial^2 L}{\partial x_k \partial x_p}
& = -2 \sum_{i=1}^n \sum_{j = i+1}^n
\delta_{jk}\delta_{jk} - \delta_{jk}\delta_{ik}-\delta_{ik}\delta_{jk} + \delta_{ik}\delta_{ik}\\
& = -2 \sum_{i=1}^n \sum_{j = i+1}^n
\delta_{jk} - 2\delta_{jk}\delta_{ik} + \delta_{ik}\\
& = -2\biggl[ (k-1) + (n-k) - 2\sum_{i=1}^n \sum_{j = i+1}^n
\delta_{jk}\delta_{ik} \biggr] & \text{by sum-i and sum-j}\\
\end{align}
The remaining product $\delta_{jk}\delta_{ik}$ is $1$ only if $i$ and $j$ are equal, but since $j$ starts at $i+1$, this never happens. Hence
\begin{align}
\frac{\partial^2 L}{\partial x_k \partial x_p}
& = 2 - 2n
\end{align}
in the case where $k = p$.
Now look at $k \ne p$. We have
\begin{align}
\frac{\partial^2 L}{\partial x_k \partial x_p}
& = -2 \sum_{i=1}^n \sum_{j = i+1}^n \delta_{jp}\delta_{jk} +
2 \sum_{i=1}^n \sum_{j = i+1}^n \delta_{jp}\delta_{ik} +
2 \sum_{i=1}^n \sum_{j = i+1}^n \delta_{ip}\delta_{jk} - 2 \sum_{i=1}^n \sum_{j = i+1}^n \delta_{ip}\delta_{ik}
\end{align}
By sum-kp, the two middle terms are $\delta_{k < p}$ and $\delta_{p<k}$, so exactly one of them is $1$, and we can replace their sum with a $1$ (which gets multiplied by the $2$ in front!). So we have
\begin{align}
\frac{\partial^2 L}{\partial x_k \partial x_p}
& = 2
-2 \sum_{i=1}^n \sum_{j = i+1}^n\delta_{jp}\delta_{jk} - 2 \sum_{i=1}^n \sum_{j = i+1}^n \delta_{ip}\delta_{ik} \\
\end{align}
Furthermore, because $k$ and $p$ are distinct, $j$ cannot equal both of them, so the first sun is zero; similarly for the second. We end up with
\begin{align}
\frac{\partial^2 L}{\partial x_k \partial x_p}
& = 2
\end{align}
On the right-hand side, we have
\begin{align}
\frac{\partial R}{\partial x_k}
&= 2\big(\sum_{i=1}^n{x_i}\big)
-2n x_k
- {(n-2k+1)} \\
\end{align}
we get
\begin{align}
\frac{\partial^2 R}{\partial x_k \partial x_p}
&= 2\big(\sum_{i=1}^n{
\delta_{ip}}\big)
-2n \delta_{kp} \\
&= 2 -2n \delta_{kp} \\
\end{align}
which agrees exactly with the result for the left-hand side. We're done!