Abelian group (Commutative group) [duplicate]
Solution 1:
$aabb=(ab)^2=abab$ implies that $a^{-1}aabbb^{-1} = a^{-1}ababb^{-1}$. So, $eabe = ebae$. Hence $ab=ba$.
$aabb=(ab)^2=abab$ implies that $a^{-1}aabbb^{-1} = a^{-1}ababb^{-1}$. So, $eabe = ebae$. Hence $ab=ba$.