Let $m$ and $n$ be fixed positive integers and $R$ a ring with identity in which $x^my^n=y^nx^m$ and $x^my^{n+2}=y^{n+2}x^m$ hold for all $x,y\in R$. Then $R$ is commutative provided it contains no non-zero elements $x$ for which $p!x=0$, where $p=\max\{m,n +1\}$. Another commutativity theorem for $R$ under a different set of conditions is also obtained. The method of proof is based on an iteration technique.