I found this question in an algebra qualifying exam and I'm interested if anyone has a way to organize the way I should be trying to solve it or if there's a better way to approach it.
Question: Let $G$ be a group generated by two elements $a,b$ where $a^2=b^2=1$. Show that the commutator subgroup $G'$ is cyclic.
So far I have reasoned that we can write any element of $G$ as $(ab)^n$ or $(ab)^nb$ or $(ba)^n$ or $(ba)^nb$ for some $n\geq0$. Then we have identities such as $(ab)^{-1}=ba$ and $(ab)^nb=b(ba)^n$ so we can check that every commutator of combinations of the four options above (for instance $[(ab)^n,(ba)^mb]$) can be written as $(ab)^{2l}$ for some integer $l$. Thus $G'$ is generated by $abab=[a,b]$.
I'd rather not do all that work so is there a way to avoid it that might give more understanding?