In Gallian's Contemporary Abstract Algebra, 9th edition, on page 145, he is trying to prove the following: "Let $G$ be a group of order $2p$ , where $p$ is a prime greater than $2$. Then, G is isomorphic to $\mathbb{Z}_{2p}$ or $D_p$". He first proves that G must have an element of order $p$, which he names $a$. The following part of the proof is confusing to me:
Now let $b$ be any element not in $\langle a \rangle$, then by Lagrange's Theorem and the assumption that G does not have an element of order $2p$, we have that $|b|=2$ or p. Because $|\langle a \rangle \cap \langle b \rangle|$ divides $|\langle a \rangle|=p$ and $\langle a \rangle \neq \langle b \rangle$we have that $|\langle a \rangle \cap \langle b \rangle|=1$.
This part I am confused about. How does he conclude that? I can only think that $|\langle a \rangle \cap \langle b \rangle|$ is a subgroup, so its order must divide $2p$.