Suppose that $G$ is a group with the property that for every choice of elements in $G$, $axb=cxd$ implies $ab=cd$. Prove that $G$ is Abelian. Suppose that $G$ is a group with the property that for every choice of elements in $G$, $axb=cxd$ implies $ab=cd$. Prove that $G$ is Abelian. (Middle cancellation implies commutativity).
I am having trouble with this homework problem. The way I started was:
Suppose $G$ is a group for which middle cancellation holds. Multiply $x$ by its inverse, $x^{-1}$ using middle cancellation so you have $ab=cd$. Thus $G$ is Abelian. 
I am unsure if this is the way to approach it.

Let $a,b\in G$. Then you have $(bab^{-1})ba(e)=(e)ba(a)=ba^2$, so by hypothesis you can conclude that $bab^{-1}e=ea$, that is $bab^{-1}=a$, which implies $ab=(bab^{-1})b=ba$, so $G$ is abelian.
