If$(ab)^n=a^nb^n$ & $(|G|, n(n-1))=1$ then $G$ is abelian
We can assume that $n>2$. Since $(ab)^n = a^nb^n$, for all $a,b\in G$, we can write $(ab)^{n+1}$ in two different ways: $$(ab)^{n+1} = a(ba)^nb = ab^na^nb,$$ and $$(ab)^{n+1} = ab(ab)^n = aba^nb^n.$$ Hence, $$ab^na^nb = aba^nb^n.$$ Cancel $ab$ on the left and $b$ on the right to obtain $$b^{n-1}a^n = a^nb^{n-1}.$$ Note that this is true for all $a,b\in G$. (This says that the $n$th power of any element of $G$ commutes with the $(n-1)$st power of any element of $G$.)
Now let $x,y\in G$ be arbitrary; we want to show that $x$ and $y$ commute. Since the order of $G$ is prime to $n$, the $n$th power map $t\mapsto t^n$ on $G$ is bijective, so there exists $a\in G$ such that $x = a^n$. Since the order of $G$ is prime to $n-1$, there exists $b\in G$ for which $y=b^{n-1}$. Therefore, $xy = a^nb^{n-1} = b^{n-1}a^n = yx$. Because $x$ and $y$ were arbitrary, it follows that $G$ is commutative.
ADDED:
Lemma. Let $G$ be a group of finite order $m$, and let $k$ be a positive integer such that $(k,m)=1$. Then the $k$th power map $x\mapsto x^k$ on $G$ is bijective.
Proof. Since $G$ is finite, it suffices to show that the map $x\mapsto x^k$ is surjective. To this end, let $g\in G$; we show that $g$ is the $k$th power of some element in $G$. Since the order of $g$ divides the order of the group $G$, it follows that $(\left| g\right|, k) = 1$. Therefore, $\langle g\rangle = \langle g^k\rangle$. Hence, there is an integer $r$ for which $g = (g^k)^r = g^{kr} = (g^r)^k$. This completes the proof.