Notations: $|C|$= no. of distinct elements in $C$= order of group $C$, if $C$ denotes a group.
$HK=\{hk : \forall \;\;h\in H, g \in G\}.$
The problem lies here: $HK$ may not be a subgroup of $G$. If $HK$ is a subgroup of $G$ then indeed we must have $|HK|\le |G|$, but if $HK$ is not a subgroup of $G$, then there is no reason to believe that $|HK|\le |G| $. Can it be proven that nonetheless, $|HK|\le |G| $? $\tag{A}$
This doubt comes from while proving that every group of order $2p$ (where $p$ is a prime $\gt 2$) is isomorphic to either $\mathbb Z_{2p}$ or $D_p$ (dihedral group of order $2p$).
Following is how the proof goes:
If $G$ contains an element of order $2p$ then $G$ is cyclic of order $2p$ and hence isomorphic to $Z_{2p}$.
So suppose that $G$ does not have any element of order $2p$. By Lagrange's theorem, possible orders of non -identity elements of $G$ are $2$ and $p$. Assuming that all elements of $G$ have order $2$ gives a contradiction as suppose that $a,b \in G$ then $\{e,a,b,ab\}$ is a subgroup of order $4$, which contradicts Lagrange's theorem. Hence there must exist atleast one element of order $p$ in $G$. Let it be $a$.
Suppose that $b\in G$ such that $b \notin \langle a\rangle$, $|b|$ can be either $2$ or $p$. $|\langle a \rangle \cap\langle b \rangle|=1 $ since $\langle a \rangle \cap\langle b \rangle$ is a subgroup of $\langle a \rangle$, and$\langle a \rangle \ne \langle b \rangle$. Now $|b|$ must be $2$ because if $|b|=p$, then
$$|\langle a \rangle \langle b \rangle|=\frac{|\langle a \rangle||\langle b \rangle|}{|\langle a \rangle \cap\langle b \rangle|}=p^2\gt 2p \tag {1}$$
$(1)$ is a contradiction. Due to the problem mentioned above in $(A)$, I don't understand how $(1)$ can be a contradiction?
If $(1)$ is a contradiction, then it will follow that $|b|=2$. In particular, for all elements of $G$ not in $\langle a \rangle $, order $=2$. Therefore since $ab \notin \langle a \rangle $, we have $|ab|=2 \implies ab =ba^{-1}$. Writing Cayley Table, we observe that $G$ is isomorphic to $D_{2p}$.
Can you please help me understand $(A)$ and $(1)$? Thanks for your time.