Let $f$ and $g$ be two group homomorphisms from $G$ to $G'$. Is $H$ a subgroup of $G$? Can someone please verify this?

Let $f$ and $g$ be two group homomorphisms from $G$ to $G'$. Let $H \subset G$ be the subset $\{x \in G: f(x)=g(x)\}$. Is $H$ a subgroup of $G$?

Let $e$ and $e'$ denote the identity elements of $G$ and $G'$, respectively. Using the fact that a homomorphism maps the identity to the identity, we have
\begin{eqnarray}
f(e) = g(e) = e'
\end{eqnarray}
Therefore, $e \in H$. Now, let $x \in H$. Then,
\begin{eqnarray}
f(x) &=& g(x) \\
\end{eqnarray}
Since we proved that $e \in H$,
\begin{eqnarray}
f(x \cdot x^{-1}) &=& g(x \cdot x^{-1}) \\
f(x)*f(x^{-1})&=&g(x)*g(x^{-1}) \\
f(x)*f(x^{-1}) &=& f(x)*g(x^{-1}) \\
f(x^{-1})&=&g(x^{-1})
\end{eqnarray}
This implies that $x^{-1} \in H$. Now, let $x$ and $y$ be elements in $H$. Then,
\begin{eqnarray}
f(x \cdot y) &=& f(x)*f(y)\\
&=& g(x)*g(y)\\
&=& g(x \cdot y)
\end{eqnarray}
So, $x \cdot y \in H$.
Since $H$ is closed under the operation $\cdot$, contains the identity and inverse elements, it is a subgroup of G. The associativity of $\cdot$ in $H$ carries over from the associativity of $\cdot$ in $G$. 

I'd like to point out a more abstract answer, which only works for abelian groups (a similar argument as in the comment is described beneath):
Let's consider the set $Hom(G, G')$ consisting of all the group homomorphisms from $G$ to $G'$ of abelian groups. This becomes a group if we define $(f*g)(x) := f(x) * g(x)$ for all $f, g \in Hom(G, G')$ and all $x \in G$. 
(Maybe you already learned that. If not, then proving that $Hom(G, G')$ is a group is as difficult/easy as your prove that $H$ is a subgroup of $G$)
Now we have $H = \{x \in G | f(x) = g(x)\} = \{x \in G \mid (f*g^{-1})(x) = 1)\} = ker(f*g^{-1})$, were $ker(h)$ means the kernel of $h \in Hom(G, G')$. A kernel of a group homomorphism is always a (even normal) subgroup.

Another proof follows the idea of k.stm. It works for all groups:
Let $f \times g: G \to G' \times G’$ be the diagonal map (which is again a group homomorphism) given by $x \mapsto (f(x), g(x))$. $G' \times G'$ is a group by componentwise multiplication. Now the proof consists of the following parts:
$1.$ Proving that the diagonal $\Delta = \{(y, y) \mid y \in G'\}$ is a subgroup of $G' \times G'$
$2.$ Proving the equality $(f \times g)^{-1}(\Delta) = H$
$3.$ Proving or knowing that the preimage of a subgroup under a group homomorphism is a subgroup.
