# If in a group $G$ , $(ab)^2=(ba)^2$ for all $a,b \in G$ , then show that $G$ is abelian .

Initially , I have placed $a^{-1}b$ in place of $b$ , and obtained $a^2b= ba^2$ for all $a\in G$. Consequently, i have obtained $ab^2=b^2a$ . Then what to do ?

You don't. A counterexample is the quaternion group of order $8$.