I think the key here is to realize that $f(G)$ is a subgroup of $H$; thus $\vert f(G) \vert \mid \vert H \vert$ by Lagrange's theorem. Furthermore, $\ker f$ is a (normal) subgroup of $G$, with $G / \ker f$ isomorphic to $f(G)$. Thus $\vert G \vert = [G:\ker f] \vert \ker f \vert = \vert f(G) \vert \vert \ker f \vert$, showing $\vert f(G) \vert \mid \vert G \vert$. In fact, we have established the tidy relationship $\vert G \vert = \vert \ker f \vert \vert f(G) \vert = \vert \ker f \vert \vert \text{im} f \vert$. QED
Hope this helps. Cheerio,
and as always,
Fiat Lux!!!
I like to see the order of an element $g\in G$ as the cardinality of
$$
\langle g\rangle=\{g^n:n\in\mathbb{Z}\}
$$
(a natural number in case it's finite, infinity otherwise).
If you know this characterization, then you can observe that $f$ induces a surjective homomorphism $\tilde{f}\colon\langle g\rangle\to\langle f(g)\rangle$ and so, by the homomorphism theorem
$$
\langle f(g)\rangle\cong \langle g\rangle/\ker\tilde{f}
$$
which implies your assert, by Lagrange's theorem.
Now let's prove the characterization of the order. Consider the unique homomorphism $\varepsilon_g\colon \mathbb{Z}\to G$ such that $\varepsilon_g(1)=g$, that is, $\varepsilon_g(n)=g^n$. Then the image of $\varepsilon_g$ is precisely $\langle g\rangle$ and so
$$
\langle g\rangle\cong \mathbb{Z}/\ker\varepsilon_g
$$
If $\ker\varepsilon_g=\{0\}$, then $\varepsilon_g$ is injective, so $g^n\ne1$ for $n>0$, which means that $g$ has infinite order and that $\langle g\rangle$ is infinite. Otherwise, $\ker\varepsilon_g=k\mathbb{Z}$ with $k>0$.
In this case $|\langle g\rangle|=|\mathbb{Z}/k\mathbb{Z}|$. Moreover $g^k=1$, as $k\in\ker\varepsilon_g$. To finish off, observe that, for $0<r<k$, $r\notin\ker\varepsilon_g$, so $g^r\ne1$. Thus $k$ is indeed the minimum exponent $m>0$ such that $g^m=1$.
Best Answer
Hint: Since $f$ is injective, we know that $H$ contains a "copy" of $G$. Namely, the image $\text{im}(f) \le H$ is a subgroup of $H$ isomorphic to $G$ (why?). But if $G$ and $H$ are the same order, what can we conclude about $\text{im}(f)$ and $H$?