Let $a \in H$. To show that $H$ is a subgroup of $G$, it suffices to show that the inverse $a^{-1}$ is in $H$.
If $a=e$ is the identity element, this is trivial. So we assume that $a \neq e$.

Note that $a^2=a\cdot a\in H$, $a^3=a^2\cdot a\in H$, and repeating this we see that $a^n\in H$ for any positive integer $n$.
Since $G$ is finite, not all of $a^n$ can be different.
Thus there exists positive integers $m, n$ such that $a^m=a^n$ and $m>n$.

Note that we actually have $m>n+1$.
For if $m=n+1$, then we have $a^{n+1}=a^n$ and this implies that $a=e$.
This contradicts out choice of $a$. Thus we have $m>n+1$, or equivalently we have
\[m-n-1>0.\]

Since we have
\[a^{m-n}=e,\]
multiplying by $a^{-1}$ we obtain
\[a^{-1}=a^{m-n-1}.\]

Since $m-n-1>0$, the element $a^{m-n-1}\in H$, hence the inverse $a^{-1}\in H$.
Therefore, $H$ is closed under the group operation and inverse, thus $H$ is a subgroup of $G$.

Remark.

In fact, the group $G$ itself can be an infinite group.
We just need that $H$ is a finite subset satisfying the closure property:for any $a,b \in H$, $ab\in H$.

The proof of this generalization is identical to the proof given above.

Elements of Finite Order of an Abelian Group form a Subgroup
Let $G$ be an abelian group and let $H$ be the subset of $G$ consisting of all elements of $G$ of finite order. That is,
\[H=\{ a\in G \mid \text{the order of $a$ is finite}\}.\]
Prove that $H$ is a subgroup of $G$.
Proof.
Note that the identity element $e$ of […]

Fundamental Theorem of Finitely Generated Abelian Groups and its application
In this post, we study the Fundamental Theorem of Finitely Generated Abelian Groups, and as an application we solve the following problem.
Problem.
Let $G$ be a finite abelian group of order $n$.
If $n$ is the product of distinct prime numbers, then prove that $G$ is isomorphic […]

Torsion Subgroup of an Abelian Group, Quotient is a Torsion-Free Abelian Group
Let $A$ be an abelian group and let $T(A)$ denote the set of elements of $A$ that have finite order.
(a) Prove that $T(A)$ is a subgroup of $A$.
(The subgroup $T(A)$ is called the torsion subgroup of the abelian group $A$ and elements of $T(A)$ are called torsion […]

Pullback Group of Two Group Homomorphisms into a Group
Let $G_1, G_1$, and $H$ be groups. Let $f_1: G_1 \to H$ and $f_2: G_2 \to H$ be group homomorphisms.
Define the subset $M$ of $G_1 \times G_2$ to be
\[M=\{(a_1, a_2) \in G_1\times G_2 \mid f_1(a_1)=f_2(a_2)\}.\]
Prove that $M$ is a subgroup of $G_1 \times G_2$.
[…]

Quotient Group of Abelian Group is Abelian
Let $G$ be an abelian group and let $N$ be a normal subgroup of $G$.
Then prove that the quotient group $G/N$ is also an abelian group.
Proof.
Each element of $G/N$ is a coset $aN$ for some $a\in G$.
Let $aN, bN$ be arbitrary elements of $G/N$, where $a, b\in […]

Abelian Group and Direct Product of Its Subgroups
Let $G$ be a finite abelian group of order $mn$, where $m$ and $n$ are relatively prime positive integers.
Then show that there exists unique subgroups $G_1$ of order $m$ and $G_2$ of order $n$ such that $G\cong G_1 \times G_2$.
Hint.
Consider […]

The Index of the Center of a Non-Abelian $p$-Group is Divisible by $p^2$
Let $p$ be a prime number.
Let $G$ be a non-abelian $p$-group.
Show that the index of the center of $G$ is divisible by $p^2$.
Proof.
Suppose the order of the group $G$ is $p^a$, for some $a \in \Z$.
Let $Z(G)$ be the center of $G$. Since $Z(G)$ is a subgroup of $G$, the order […]

Sylow Subgroups of a Group of Order 33 is Normal Subgroups
Prove that any $p$-Sylow subgroup of a group $G$ of order $33$ is a normal subgroup of $G$.
Hint.
We use Sylow's theorem. Review the basic terminologies and Sylow's theorem.
Recall that if there is only one $p$-Sylow subgroup $P$ of $G$ for a fixed prime $p$, then $P$ […]