The idea of this approach is to work with a class of very small, finite, subgroups $H$ of $G$ in which we can prove commutativity. The reason for this is to be able to use the results like Cauchy's theorem and Lagrange's theorem.
Consider the subgroup $H$ generated by two distinct, nonidentity elements $a,b$ in the given group. The group $H$ consists of strings of instances of $a$ and $b$. By induction on the length of a string, one can show that any string of length 4 or longer is equal to a string of length 3 or shorter.
Using this fact we can list the seven possible elements of $H$:
$$1,a,b,ab,ba,aba,bab.$$ By (the contrapositive of) Cauchy's Theorem, the only prime divisor of $|H|$ is 2. This implies the order of $H$ is either $1$, $2$, or $4$.
If $|H|=1$ or $2$, then either $a$ or $b$ is the identity, a contradiction.
Hence $|H|$ has four elements. The subgroup generated by $a$ has order 2; its index in $H$ is 2, so it is a normal subgroup. Thus, the left coset $\{b,ba\}$ is the same as the right coset$\{b,ab\}$, and as a result $ab=ba$.