if G is generated by {a,b} and ab=ba, then prove G is Abelian if G is generated by {a,b} and ab=ba, then prove G is Abelian
All elements of G will be of the form $a^kb^j,\,\, k,j \in \mathbb{Z}^+$ 
so I need to get $a^kb^j = b^ja^k$

First notice that $G=<a,b>$ does not imply directly that all elements of $G$ are of the form $a^kb^j$.
Here we have to different assertion the first one is $G=<a,b> \,\,\,(1)$ and the second one is $ab=ba\,\,\, (2)$. If this two assertions are true than the $G$ is Abelian. To understand the consequences of $(2)$ over $G$ we need first to understand what $G$ look like without $(2)$ and then assuming $(2)$ we simplify $(1)$.
The definition of the group $<a,b>$ is the following :

$$<a,b>=\big\{a^{i_1}b^{j_1}\cdots a^{i_n}b^{j_n}\Big / n\in \mathbb{N}, (i_1,j_1,\cdots,i_n,j_n)\in \mathbb{Z}\big\} $$

Let's suppose that $ab=ba$, we pick two elements $x,y$ of the group $<a,b>$ we can write :
$$x=a^{i_1}b^{j_1}\cdots a^{i_n}b^{j_n}\\y=a^{l_1}b^{k_1}\cdots a^{l_m}b^{k_m} $$
and we want to prove that $xy=yx$ , the idea is to prove it by induction on $$n(x)=\sum_{i=1,\cdots,n}|i_k|+|j_k|$$


*

*$n(x)=0$ implies that $x$ is the neutral element.

*$n(x)=1$ then $x=a$ or $x=b$, because of the symmetric role of $a$ and $b$ we can assume WLOG that  $x=a$, we have $ab=ba$ so $ab^k=ab.b^{k-1}=b (b.a^{k-1})$using this, we can prove for all $k\in \mathbb{Z}$ that $ab^k=b^ka$ hence :
$$ay=a.a^{l_1}b^{k_1}\cdots a^{l_m}b^{k_m}=a^{l_1}.a.b^{k_1}\cdots a^{l_m}b^{k_m}=a^{l_1}b^{k_1}.a.\cdots a^{l_m}b^{k_m}\\ =a^{l_1}b^{k_1}\cdots a^{l_m}b^{k_m}.a=y.a $$
because $a$ commutes with the powers of both $a$ and $b$, so $xy=yx$

*Now suppose that the result is true for all $t$ such that $n(t)=k$, Let $x$ be an element of $<a,b>$ such that $n(x)=k+1$ so we can write either $x=tb$, $x=tb^{-1}$, $x=ta$ or $x=ta^{-1}$ for some $t$ such that $n(t)=k$,and we apply the induction hypothesis in all four cases to conclude that $xy=yx$

