Let $G$ be a group, where $(ab)^3=a^3b^3$ and $(ab)^5=a^5b^5$. How to prove that $G$ is an abelian group? Let $G$ be a group, where $(ab)^3=a^3b^3$ and $(ab)^5=a^5b^5$. Prove that $G$ is an Abelian group. I know that the answer for this question has been already posted and I have seen it. However, could somebody explain in detail the steps required to prove that $G$ is an Abelian group. Why, for example, could not we just divide $ababab = aaabbb$ by $ab$, get $abab = aabb$, cancel $a$ and $b$ and get $ba = ab$? 
 A: Suppose $(ab)^3 = a^3b^3$, that is:
$ababab = aaabbb$
Multiplying on the left by $a^{-1}$ and on the right by $b^{-1}$, we have:
$baba = a^{-1}abababb^{-1} = a^{-1}aaabbbb^{-1} = aabb$
That is, $(ba)^2 = a^2b^2$.
Since we know $(ab)^5 = a^5b^5$ as well:
$(ab)^5 = ababababab = a(babababa)b = a(ba)^4b$, so
$a(ba)^4b = a^5b^5$, and multiplying on the left by $a^{-1}$ and on the right by $b^{-1}$:
$(ba)^4 = a^4b^4$.
So $(ba)^4 = [(ba)^2]^2 = [a^2b^2]^2 = a^4b^4$.
Mutliplying $(a^2b^2)^2 = a^4b^4$ on the left by $a^{-2}$ and on the right by $b^{-2}$:
$b^2a^2 = a^2b^2$.
It may seem like we are not making much progress, but this is what we needed.
Going back to $(ab)^3 = a^3b^3$, we can now write:
$(ab)^3 = a^3b^3 = a(a^2b^2)b = ab^2a^2b$.
That is: $(ab)(ab)(ab) =(ab)(ba)(ab)$, so multiplying by $b^{-1}a^{-1}$ on the left AND the right on both sides gives us:
$ab = ba$, as desired.

The point is-in groups we can cancel "on the left":
$ax = ay \implies x = y$
or "on the right":
$xa = ya \implies x = y$
but NOT "in the middle":
$xay = uav$ does NOT imply $xy = uv$.
A: The issue with your proof is that canceling $a$ from the left and $b$ from the right of $$ababab=aaabbb$$ only gives you $baba=aabb$. Notice that this is different from what you got which is $abab=aabb$.
Perhaps the issue for you was cancelling from the middle as Steven Stadnicki has suggested. It looks like this question has been created to answer that exact issue, so please take a look at it.
A: Suppose that $a,b \in G$ are arbitary elements of the group G, with the assumption that $(ab)^3 = a^3 b^3$, and $(ab)^5 = a^5 b^5$.
Observe that for
$$
(ab)^3 = a^3 b^3
$$
Multiplying left and right by respective inverses yields
$\implies  ababab = aaabbb \implies baba = aabb $
In addition we have 
\begin{equation}
(ab)^5 = a^5 b^5 
\end{equation}
Multiplying left and right by respective inverses yeilds 
$\implies ababababab = aaaaabbbbb\implies a^{-1}abababababb^{-1}=a^{-1}aaaaabbbbbb^{-1}$
$\implies babababa=aaaabbbb$
So, now we have reduced this to a new problem. 
$(ba)^4 = a^4 b^4$ and $(ba)^2 = a^2 b^2$
Now notice that 
$(ba)^4 = (ba)^2(ba)^2 = (a^2 b^2)(a^2 b^2)$ This now shows us that the following is also true. 
$a^4 b^4 = a^2 b^2 a^2 b^2$ We now have another instance of cancellation using inverses in fact this time we can cancel twice on each side. Giving us $a^2b^2 =b^2 a^2$. We are getting close! Recall that we have the relation $(ba)^2 = a^2 b^2$. This is equivalent to saying $(ab)^2 = b^2 a^2$. All we have done is switch their roles. The rest of the proof falls out rather quickly. We now have 
$$
a^2b^2=b^2a^2= (ab)^2 = abab
$$ 
A final multiplication of inverses on each side the desired result $ab = ba$. Thus the group is Abelian. 
A: In general, there is no middle cancellation property for groups. (If middle cancellation holds, then the group is abelian.)
Consider the group $D$ of symmetries of an equilateral triangle. For definiteness, assume the triangle has a horizontal base. The elements of this group consist of actions that leave the triangle's shape unchanged; they include:


*

*$e$, the identity;

*$r$, a rotation clockwise by 1/3 of a turn;

*$f$, a reflection left-to-right through the altitude of the triangle. 
You can check (use your mind's eye--I'm too lazy to construct the diagram) that rotation, followed by reflection, followed by rotation has the same effect as a single reflection:
$$rfr = f$$
However, two rotations don't equal the identity:
$$rr \ne e  .$$
Put another way, we have
$$ rfr = efe \quad{\rm but}\quad rr\ne ee$$
