Let $p$ be a prime number and $q \in \Bbb N$ be such that $q\ |\ (p-1).$ Let $u \in \Bbb Z_p^*$ be an element of order $q.$ Now consider the group $G$ defined by $$G = \left \langle a, b\ \big |\ a^p = b^q = e,\ b^{-1} a b = a^u\ \right \rangle.$$ Prove that any element of $G$ can be written as $a^i b^j,$ for some $0 \leq i \lt p$ and $0 \leq j \lt q$ and hence $|G| = pq.$
My question is $:$ How do I write $ba$ in the form of $a^ib^j\ $? Can anybody please help me in this regard.
Thanks for your time.
Since $b^{-k}ab^k=a^{u^k}$, then we have $ba=b^{-(q-1)}ab^{q-1}b=a^{u^{q-1}}b$.