Let $G$ be a group with the following property: for every $H, K \leq G$, either $H \subseteq K$ or $K \subseteq H$. Show that there exists a prime number $p$ such that the order of every element of $G$ is a power of $p$.
It is straightforward to show the result above when $G$ is finite. Indeed, fix $g \in G$ and consider $|\langle g \rangle| = p^{k}m$ where $(p, m) = 1$ and $m \neq 1$. Then, $g^{p^{k}}$ has order $m$ and $g^{m}$ has order $p^k$. By the hypothesis, either $$\langle g^{p^k} \rangle \subseteq \langle g^m \rangle\text{ or }\langle g^m \rangle \subseteq \langle g^{p^k} \rangle.$$ Both cases contradict Lagrange's Theorem. Thus, $m = 1$ and the order of $g$ is $p^k$. Given any other element in $G$, say $h$, we have either $\langle g \rangle \subseteq \langle h \rangle$ or $\langle h \rangle \subseteq \langle g \rangle$, which means the order of $h$ is either a power of $p$ or a multiple of a power of $p$. In the first case, we are done. In the second case, the argument above shows that $m \neq 1$ leads to a contradiction.
Question: I'm not sure how to approach this problem in the infinite case, since we could have elements with $\infty$ order. It seems that there is something missing. It is later asked to show that infinite groups with the property stated above are isomorphic to $U_{p^{\infty}}$ for some prime $p$, where $$U_{p^{\infty}} = \{z \in S^{1}; z^{p^{k}} = 1\text{ for some }k \geq 0\}.$$ Since all subgroups of $U_{p^{\infty}}$ are finite, it lead me to believe that perhaps we have to assume every proper subgroup is finite, but I couldn't think of a counterexample. What is going on here?
Let $x\in G$. If $x$ had infinite order, then $H=\langle x^2\rangle$ and $K=\langle x^3\rangle$ are two subgroups of $G$, but $H\not\subseteq K$ (since $x^2\in H\setminus K$), and $K\not\subseteq H$ (since $x^3\in K\setminus H$). Thus, given the assumption on $G$, it follows that every element of $G$ has finite order.
(To prove it directly without a proof by contradiction, let $x\in G$, and consider $H=\langle x^2\rangle$, $K=\langle x^3\rangle$; then either $H\leq K$ or $K\leq H$; if $H\leq K$, then there exists $k$ such that $x^2=(x^3)^k = x^{3k}$, so $x^{3k-2}=1$, proving $x$ has finite order (since $3k-2\neq 0$); and if $K\leq H$, then there exists $k$ such that $x^3=(x^2)^k = x^{2k}$, so now $x^{2k-3}=1$, and since $2k-3\neq 0$, this shows $x$ has finite order. Either way, we conclude $x$ has finite order.)
At this point, the rest of your argument shows every element has order a power of a prime, and that the prime is the same for all elements.