[proofplan]
We first use [naturality of the Lie group exponential](/theorems/8802) to show that $\varphi$ and $\psi$ agree on the image under $\exp_G$ of a small neighbourhood of $0\in\mathfrak g$. Since the exponential map is a local diffeomorphism at $0$, this gives agreement on an identity neighbourhood in $G$. We then form the equalizer subgroup $K=\{g\in G:\varphi(g)=\psi(g)\}$, prove it is a closed subgroup containing an open identity neighbourhood, and conclude that it is open. Finally, connectedness of $G$ forces this nonempty open-and-closed subgroup to be all of $G$.
[/proofplan]
[step:Use exponential naturality to get agreement near the identity]
Let
\begin{align*}
\exp_G:\mathfrak g\to G
\end{align*}
and
\begin{align*}
\exp_H:\mathfrak h\to H
\end{align*}
denote the Lie group exponential maps of $G$ and $H$. For every $X\in\mathfrak g$, [Exponential Naturality]([citetheorem:8802]) applied to the homomorphisms $\varphi$ and $\psi$ gives
\begin{align*}
\varphi(\exp_G X)=\exp_H(d\varphi_{e_G}(X)).
\end{align*}
and
\begin{align*}
\psi(\exp_G X)=\exp_H(d\psi_{e_G}(X)).
\end{align*}
Since $d\varphi_{e_G}=d\psi_{e_G}$ as maps $\mathfrak g\to\mathfrak h$, the right-hand sides are equal. Hence
\begin{align*}
\varphi(\exp_G X)=\psi(\exp_G X)
\end{align*}
for every $X\in\mathfrak g$.
The differential of $\exp_G$ at $0\in\mathfrak g$ is the identity map on $\mathfrak g$. By the [inverse function theorem](/theorems/51), there exist open neighbourhoods $U\subset\mathfrak g$ of $0$ and $V\subset G$ of $e_G$ such that
\begin{align*}
\exp_G|_U:U\to V
\end{align*}
is a diffeomorphism. Therefore $\varphi$ and $\psi$ agree at every point of $V$.
[guided]
The goal of this first step is to convert the infinitesimal equality
\begin{align*}
d\varphi_{e_G}=d\psi_{e_G}
\end{align*}
into an actual equality of the maps $\varphi$ and $\psi$ on some [open set](/page/Open%20Set) in $G$.
Let
\begin{align*}
\exp_G:\mathfrak g\to G
\end{align*}
and
\begin{align*}
\exp_H:\mathfrak h\to H
\end{align*}
be the exponential maps. For a fixed $X\in\mathfrak g$, [Exponential Naturality]([citetheorem:8802]) says that a Lie [group homomorphism](/page/Group%20Homomorphism) commutes with exponentials after applying its differential. Applied to $\varphi$, this gives
\begin{align*}
\varphi(\exp_G X)=\exp_H(d\varphi_{e_G}(X)).
\end{align*}
Applied to $\psi$, it gives
\begin{align*}
\psi(\exp_G X)=\exp_H(d\psi_{e_G}(X)).
\end{align*}
The hypothesis states that the two linear maps $d\varphi_{e_G}$ and $d\psi_{e_G}$ from $\mathfrak g$ to $\mathfrak h$ are equal. Hence, for the same $X$,
\begin{align*}
d\varphi_{e_G}(X)=d\psi_{e_G}(X).
\end{align*}
Applying $\exp_H$ to both sides gives
\begin{align*}
\exp_H(d\varphi_{e_G}(X))=\exp_H(d\psi_{e_G}(X)).
\end{align*}
Combining the preceding identities, we obtain
\begin{align*}
\varphi(\exp_G X)=\psi(\exp_G X).
\end{align*}
This proves equality on the full exponential image $\exp_G(\mathfrak g)$, but for the global argument we only need equality on an open neighbourhood of the identity. The exponential map satisfies
\begin{align*}
d(\exp_G)_0=\operatorname{id}_{\mathfrak g}.
\end{align*}
Since this differential is an isomorphism, the inverse function theorem gives open neighbourhoods $U\subset\mathfrak g$ of $0$ and $V\subset G$ of $e_G$ such that
\begin{align*}
\exp_G|_U:U\to V
\end{align*}
is a diffeomorphism. Every point $v\in V$ has the form $v=\exp_G X$ for some $X\in U$, and the equality already proved gives
\begin{align*}
\varphi(v)=\psi(v).
\end{align*}
Thus $\varphi$ and $\psi$ agree on the identity neighbourhood $V$.
[/guided]
[/step]
[step:Build the equalizer subgroup]
Define
\begin{align*}
K:=\{g\in G:\varphi(g)=\psi(g)\}.
\end{align*}
Since $\varphi(e_G)=e_H=\psi(e_G)$, we have $e_G\in K$.
If $g_1,g_2\in K$, then using the homomorphism property of $\varphi$ and $\psi$,
\begin{align*}
\varphi(g_1g_2)=\varphi(g_1)\varphi(g_2)=\psi(g_1)\psi(g_2)=\psi(g_1g_2).
\end{align*}
Thus $g_1g_2\in K$. If $g\in K$, then
\begin{align*}
\varphi(g^{-1})=\varphi(g)^{-1}=\psi(g)^{-1}=\psi(g^{-1}),
\end{align*}
so $g^{-1}\in K$. Hence $K\le G$.
Define the continuous map
\begin{align*}
F:G&\to H
\end{align*}
\begin{align*}
g&\mapsto \varphi(g)\psi(g)^{-1}.
\end{align*}
The map $F$ is continuous because $\varphi$ and $\psi$ are smooth, hence continuous, and inversion and multiplication in $H$ are continuous. We have
\begin{align*}
K=F^{-1}(\{e_H\}).
\end{align*}
Since $H$ is Hausdorff, the singleton $\{e_H\}$ is closed. Therefore $K$ is closed in $G$.
[/step]
[step:Show the equalizer subgroup is open]
From the first step, there is an open neighbourhood $V\subset G$ of $e_G$ such that $\varphi(v)=\psi(v)$ for every $v\in V$. Hence
\begin{align*}
V\subset K.
\end{align*}
For each $k\in K$, let
\begin{align*}
L_k:G\to G,\qquad g\mapsto kg
\end{align*}
be left translation by $k$. The map $L_k$ is a homeomorphism, so $kV=L_k(V)$ is open in $G$. Since $K$ is a subgroup and $k\in K$, the inclusion $V\subset K$ gives
\begin{align*}
kV\subset K.
\end{align*}
Therefore
\begin{align*}
K=\bigcup_{k\in K}kV.
\end{align*}
The right-hand side is a union of open subsets of $G$, so $K$ is open in $G$.
[/step]
[step:Use connectedness to force the equalizer to be all of $G$]
We have shown that $K$ is closed and open in $G$. Also $K$ is nonempty because $e_G\in K$. Since $G$ is connected, the only subsets of $G$ that are both open and closed are $\varnothing$ and $G$. Therefore
\begin{align*}
K=G.
\end{align*}
By the definition of $K$, this means that for every $g\in G$,
\begin{align*}
\varphi(g)=\psi(g).
\end{align*}
Thus $\varphi=\psi$ as maps $G\to H$.
[/step]