Let $G$ be a group with two generators $x,y$ such that $x^{p^m}=1$, $y^{p^r}=1$, $y^{-1}xy=x^m$ where $m^{p^r}\equiv 1 \pmod {p^m}$, $p$ a prime.
Show that if $H_1$ and $H_2$ are subgroups of $G$, then $H_1H_2=H_2H_1$.
I can not see too much.
The only thing I can see is
$$y^a x^b y^c x^d=y^{a+c}x^{d+b m^c}.$$
So for a fixed element $y^a x^b$, we know that
$$ (y^a x^b)^k=y^{ka} x^{b(1+m^a+\cdots+m^{ka})}. $$