If $(ab)^3=a^3 b^3$, prove that the group $G$ is abelian. If in a group $G$, $(ab)^3=a^3 b^3$ for all $a,b\in G$, amd the $3$ does not divide $o(G)$, prove that $G$ is abelian.
I interpreted the fact that $3$ does not divide $o(G)$ as saying $(ab)^3\neq e$, where $e$ is the identity of the group. 
As for proving $ab=ba$, I did not get anywhere useful. I got the relation $(ba)^2=a^2 b^2$, but could not proceed beyond that. I got a lot of other relations too which I could not exploit- like $a^2 b^3=b^3 a^2$
A helpful hint instead of a solution would be great!
Thanks in advance!  
 A: This follows from If a group is $3$-abelian and $5$-abelian, then it is abelian, because $3$-abelian says that the only non-central elements must have exponent $3$, and since we know that the order of $G$ is not divisible by $3$, the claim follows. A further proof of the claim can be found here.
A: The result still holds if $G$ is possibly infinite and has no elements of order $3$:
Let $x, y \in G$. Let $[x, y] = xyx^{-1}y^{-1}$ be the commutator of $x$ and $y$. Then, $[x, y]^3 = ((xyx^{-1})y^{-1})^3 = xy^3x^{-1}y^{-3} = [x, y^3]$. 
So, if $x$ commutes with $y^3$ then $[x, y]^3 = 1$. By hypothesis, $x$ must
commute with $y$ (*). You found that $x^2y^3 = y^3x^2$, so $x^2$ commutes with $y$.
Hence any square is in the center.
Since $y^2$ commutes with $x$, we have $[x, y]^3 = [x, y^3] = [x, y]$. Therefore
$[x, y]^2 = 1$.
Now, $1 = [x, y]^2 = xyx^{-1}y^{-1}xyx^{-1}y^{-1} = xyxyxyx^{-3}y^{-3}$ since $x^{-2}$ and $y^{-2}$ is in the center. So, $1 = (xy)^3x^{-3}y^{-3} = [x^{3}, y^3]$. Using (*) once more we get $[x, y] = 1$.
A: This is an attempt at an elementary and linear exposition of this proof strategy, since the original seemed to cause some confusion from a comment - and it uses the language of homomorphisms, which I have avoided.
First you need to establish that every element of the group is a cube. Since the group has order not divisible by 3, we know that if $x^3=e$ then $x=e$ (using $e$ for the identity).
Now suppose that $a^3=b^3$ - then we have $e=(a^3)(b^{-1})^3=(ab^{-1})^3$ so that $ab^{-1}=e$ whence $a=b$.
This means that no two cubes of different elements are equal. So if we cube all $n$ elements in the group we get $n$ different results. Hence every element of the group must be a cube.
Now consider $(aba^{-1})^3$ in two ways.
Writing it out in full and cancelling $aa^{-1}=e$ we get $ab^3a^{-1}$
Using the special relation we have for the group we get $(ab)^3(a^{-1})^3=a^3b^3(a^{-1})^3$
Setting these equal and cancelling: $b^3=a^2b^3(a^{-1})^2$ or $b^3a^2=a^2b^3$
Since $a$ and $b$ were completely arbitrary, every square commutes with every cube. But every element of the group is a cube, so every square commutes with everything.
Now we can write $ababab=(ab)^3=a^3b^3$ and when we cancel and use the fact that squares commute we find that $baba=a^2b^2=b^2a^2$ whence $ab=ba$.

Note that the fact that the group had order not divisible by $3$ was only used to prove that there were no elements of order $3$. The question might arise about infinite groups which have no elements or order $3$ and obey the relation given in the question.
The proof here does not go through, because a counting argument was used to show that every element in the group is a cube. This counting argument cannot be transposed to the infinite case. We can still prove that all the cubes of different elements are different and that every square commutes with every cube, but that is no longer enough to conclude the argument.
