According to the statement of theorem that a commutative ring $R$ with prime characteristic $p$ satisfies
$$\begin{align} (a+b)^{p^n} = a^{p^n} + b^{p^n} \end{align}$$
$$\begin{align} (a-b)^{p^n} = a^{p^n} - b^{p^n} \end{align}$$
Where a,b $\in$ $R$, n $\geq 0$ and n $\in \mathbb{Z}$
I have thoroughly checked the proof many times but I don't understand why the condition of commutativity is important.
Take the polynomial ring in noncommuting variables $R=F_2\langle x,y \rangle$ where $F_2$ is the field of two elements.
Everything clearly has additive order $2$, but $(x+y)^2=x^2+xy+yx+y^2\neq x^2+y^2$. If the last equality did hold then $xy+yx=0$, but $xy$ and $yx$ are linearly independent in this $F_2$ algebra, so it cannot be the case.