As this question is tagged as "contest-math", I believe that ehsanmo's answer is what the question setter had in mind. Still, it's interesting to try other approaches.
One common trick for handling equalities involving commutators or the like is to left-multiply it by a matrix and also right-multiply it by the same matrix, and see what happens. Here we have
\begin{align*}
2A(B - A) &= A + B,\\
2AAB - 2AAA &= AA+AB,\\
2ABA - 2AAA &= AA+BA.
\end{align*}
Subtract the third equation from the second one, we get
\begin{align*}
&2A(AB - BA) = AB-BA,\\
&(2A-I)(AB-BA)=0.
\end{align*}
So, if we can show that $2A-I$ is nonsingular, we are done. Suppose the contrary. Then $x^T(2A-I)=0$ or $x^T(2A)=x^T$ for some nonzero vector $x$. Therefore $2A(B-A)=A+B$ implies that $x^T(B-A)=x^T(A+B)$, i.e. $x^T(2A)=x^T=0$, which is a contradiction.