I'm self-studying abstract algebra, and this is the first non-trivial group theory exercise I've done. Although it's a well-known result, I'd like to make sure it is correct as it took a good few minutes to come up with the proof.
Exercise. Let $(G,\cdot)$ be a finite group and $g\in G$. Show that $|g|$ is finite.
Proof. Consider the set of powers of $g$, that is, $X = \{g^n:n\in\Bbb N\}$. Note that this set is in bijection with $\Bbb N$, hence it is infinite. But $G$ is finite by assumption, so the elements of $X$ cannot all be distinct. In particular, let $m,k\in\Bbb N$ such that $g^m = g^{m+k}$ and $k$ is the smallest natural number with this property. These numbers are guaranteed to exist by the previous step in the argument. But then:
$g^m = g^{m+k}\Rightarrow g^{-m}g^m = g^{-m}g^{m+k}\Rightarrow g^0 = e_G = g^k$. Hence $|g| = k<\infty$ and we are done.
Out of interest (I know the stronger result (Lagrange's theorem) by rote but have not yet formally learned it), I decided to push my luck and prove an intermediate result:
Corollary. Let $(G,\cdot)$ be a finite group and $g\in G$. Then $|g|\leq |G|$.
Proof. Note that the set $X$ from before can have at most $|G|$ elements (this is trivial). Consider the subset $Y = \{g^m,g^{m+1},\dots,g^{m+k}\}$. Since $k$ is the smallest integer such that $g^m = g^{m+k}$, the elements of $Y$ are distinct. Clearly $Y$ can have at most $|G|$ distinct elements as it is a subset of $X$. Since these are all distinct, $Y$ can have no more than $|G|$ elements in general. But $Y$ has $k$ elements, and hence $k = |g| \leq |G|$ as desired.
This is more involved than what I've done previously in linear algebra and basic set/function/relation theory. Any corrections or constructive criticism on my writing would be highly appreciated. In question form, is this proof correct and well-written?
Apart from stating that $X$ is in bijection with $\mathbb N$, your proofs are fine. (There is only a surjection $\mathbb N\to X$.) A slightly different path would be to show that $X=\{g,g^2,\dots,g^k=e\}$ for the number $k$ you found. Since $X\subset G$, you have $k=|g|=|X|\leq|G|$.