If square matrices $A^2 + B^2 = 2AB$, then prove that $p_A(x) = p_B(x)$ Original problem statement:

Let $A, B \in M_n(\mathbb{C})$ such that $A^2 + B^2 = 2AB$. Prove that
for any $x \in \mathbb{C}$: $$det(A - xI_n) = det(B-xI_n)$$

Now the first observation, the equality that has to be proven is the definition of the characteristic polynomials of both matrices being equivalent, i.e. $p_A(x) = p_B(x)$.
My first thought seeing this was that I had to prove that $A \sim B$ (i.e. $A$ is similar to $B$), which in turn would imply equivalent characteristic polynomials.
I tried some algebraic manipulations to the equality given in order to utilize Jordan canonical form and somehow reach similarity, but I didn't get anywhere, so maybe that's futile. I've got a hunch that it's something way simpler, but clever.
One can also observe that we can express the commutator of both matrices:
$$[A, B] := AB - BA = \stackrel{\text{from the given}}{\dots} = (A - B)^2$$
but I'm not that knowledgeable in terms of commutators, so I couldn't find anything useful following from that.
Any hints are welcome (and I'd be glad to have a hint only, not a full solution... I need to figure it out for myself a bit, too :D)!
Thank you in advance.
 A: Let $N=A-B$. The condition $A^2+B^2=2AB$ is equivalent to $(A-B)^2=[A,B]$, i.e., $N^2=2[N,B]$. Therefore $N$ commutes with $[N,B]$ and the latter must be nilpotent, by Jacobson's lemma. It follows that $N^2$ is nilpotent and in turn, $N$ is nilpotent.
For any $x\in\ker(N)$, we have $NBx=[N,B]x=\frac12N^2x=0$. Therefore $B$ leaves $\ker(N)$ invariant. In follows that with respect to an appropriate basis, $N$ and $B$ have matrix representations
$$
N\sim\pmatrix{0_{k\times k}&N_2\\ 0_{(n-k)\times k}&N_4}
\text{ and }B\sim\pmatrix{B_1&B_2\\ 0_{(n-k)\times k}&B_4}
$$
where $k$ is the nullity of $N$. The condition $N^2=2[N,B]$ thus implies that $N_4^2=2[N_4,B_4]$. So, by a recursive argument, we see that $N$ and $B$ can be simultaneously triangularised and so do $A$ and $B$. But then the condition $A^2+B^2=2AB$ implies that $A$ and $B$ have the same spectrum and also the same characteristic polynomial.
Remark. When $N$ and $B$ are $2\times2$, our previous argument shows that $N$ is nilpotent and hence $2[N,B]=N^2=0$. That is, $B$ and $N$ (or $A$) necessarily commute. However, when the sizes of the matrices are larger, while $N$ and $B$ can be simultaneously triangularised, they do not necessarily commute. E.g. we have $2[N,B]=N^2\ne0$ when
$$
N=\pmatrix{0&1&0\\ 0&0&1\\ 0&0&0}
\text{ and }B=\pmatrix{0&1&0\\ 0&0&\frac32\\ 0&0&0}.
$$
