You just have to check the subgroup-criterion. A subset $S\subset H$ is a subgroup of $H$ if and only if
- The groupmultiplication "$\cdot$" operates on $S$ and doesn't 'break out', thus for $s_1,s_2 \in S$ it holds $s_1 \cdot s_2 \in S$.
- The neutral element $e_H$ of $H$ lies in $S$.
- For any $s \in S$ its inverse $s^{-1}$ lies in S.
Thus a subgroup of $H$ is precisely a subset of $H$ that is a group itself with the multiplication on $H$.
Now let's check this on the subset $f(K) \subseteq H$, where $K$ is a subgroup of $G$.
Let $h_1,h_2 \in f(K)$. Why is $h_1 \cdot h_2$ also in $f(K)$? $f(K)$ is defined as all the elements $h$ of $H$, such that there is an element $g \in G$ with $f(g) = h$, thus $f(K)$ is the set of all images of elements in $K$ under the homomorphism $f$. Thus we have to find an element $g \in K$, s.t. $f(g) = h_1 \cdot h_2$.
TIP: Since $h_1,h_2 \in f(K)$ there a $g_1,g_2 \in K$, s.t. $f(g_1) = h_1$ and $f(g_2) = h_2$. Then $a \cdot b = \ldots \ ?$
Now we have to check, that the neutral element $e_H$ of $H$ lies in $f(K)$. So you have to search for an element in $K$, such that $f$ maps it onto $e_H$.
Finitely lets check, that for $h \in f(K)$ also $h^{-1}$ lies in $f(K)$. Thus if you know there is some $g \in K$, such that $f(g) = h$(since $h \in f(K)$, see definition of $f(K)$ above), what element is mapped onto $h^{-1}$?
TIP: $h^{-1} = f(g)^{-1} = \ldots \ ?$
Question: Why don't you have to proof associativity for a subgroup? Why does the associativity of a subset immediatly follows from the associativity of the overlying group?