Construct a nonabelian group of order 21 ( Hint : Assume that a^3 = e, b^7 = e and find some i such that a^-1ba =a^i not equal a, which is consistent with the relation a^3 = a^7 = e)
There is a systematic mechanism when classifying groups of order pq, p and q primes with p < q and p | q-1.
Below is to find a nonabelian group of order 21 using a semidirect product.
Let G be group of order 21. Let P be a Sylow-3 subgroup of G, $\displaystyle P \in Syl_3(G) $, and let $\displaystyle Q \in Syl_7(G) $. If (q-1)=6 were not divisible by p=3. It is easy. P and Q are unique sylow subgroups in G and $\displaystyle G = P \times Q$. However, (q-1)=6 is divisible by p=3.
In this case, we use a semidirect product and $\displaystyle G = Q \rtimes_{\varphi} P \cong C_7 \rtimes_{\varphi} C_3$, for some $\displaystyle \phi:C_3 \rightarrow Aut(C_7)$ (We know that Q is a unique sylow-7 subgroup in G, thus it is normal in G. However, P is not a unique sylow-3 subgroup in G).
Since $\displaystyle Aut(C_7) \cong \mathbb{Z}_6$ and $\displaystyle |Aut(C_7)| $ is divisible by $\displaystyle |\phi(x)| $, where x in $\displaystyle C_3$, we see that $\displaystyle \phi$ is not trivial.
Let $\displaystyle C_3 = <x>$, $\displaystyle C_7=<y>$; let $\displaystyle a=(y,1), b=(1,x)$. Then $\displaystyle G=<a,b>$ with some relationships, where $\displaystyle a^7= 1 $ and $\displaystyle b^3=1$
Consider $\displaystyle ba = (1,x)(y,1) = (1 \phi(x)(y), x ) = (y^2, x) = a^2b$. We see that $\displaystyle \phi:C_3 \rightarrow Aut(C_7)$ is defined by $\displaystyle x \mapsto (y \mapsto y^2)$ here since $\displaystyle Aut(C_7)$ is cyclic, containing a unique subgroup of order 3 by Cauchy's theorem; the latter parenthesis is used to denote the automorphism of order 3.
Thus we have $\displaystyle G=<a, b |a^7=1, b^3=1, bab^{-1} = a^2>$, where $\displaystyle |G|=21$.