There are a few question on classification of groups of order $2p$ on MSE but I'd like to receive a feedback on this proof (and have a question about it at the end).
Let $G$ be a group of order $2p$. If there is an element of order $2p$ in $G$, then the group is cyclic. Suppose there is no such element. We claim that $G\simeq D_p=<a,b| a^p=1,b^2=1, baba=1>$.
By Cauchy's theorem, $G$ contains an element $a$ of order $p$. Then it contains its cyclic subgroup $H=\{1,a,\dots,a^{p-1}\}$. Let $b$ be an element outside of this subgroup. The $p$ elements $b, ba,\dots ba^{p-1}$ are pairwise different (if $ba^k=ba^m$ for $0\le k,m < p$, then $a^k=a^m$, which contradicts to the fact that $H$ contains pairwise different elements). Moreover for no $k$ and $m$ as above can the equality $a^k=ba^m$ hold (if it holds, then $b=a^ka^{-m}$, which contradicts that $b\notin H$). Thus $G=H\cup bH$ as a set.
We proceed to prove that $b^2=1$. It cannot be the case that $b^2\in H-\{1\}$ because if $b^2=a^r$ for $0 < r < p$ then $a=(a^r)^l=(b^2)^l\implies b=a^{-2l}$, which contradicts to the fact that $b\notin H$ (here we use that $H$ can be generated by any non-identity element because $p$ is prime; in particular, $H=<a^r>$ so that $a=(a^r)^l$ for $l$ an integer). We cannot have $b^2\in bH$ either because $b^2=ba^k$ yields $b\in H$. Thus $b^2=1$.
Also $(ba)^2=1$. Indeed, if $baba\in bH$, then similarly $b\in H$. If $baba\in H-\{1\}$, then $baba=a^r\implies bab=a^{r-1}\implies b^2=a^{r-2}$, and as above, $a=(a^{r-2})^l=(b^2)^l\implies b=a^{-2l}$.
So $G$ is generated by $a,b$ and the relations $a^p=b^2=baba=1$ hold in $G$.
Is it sufficient to conclude that $G$ is isomorphic to $D_p$? Or do I need to verify somehow that there are no relations in $G$ other than those implied by the ones above? And are there any other gaps or mistakes in my proof?