[guided]Let $e$ denote the identity element of $G$. Since $H$ and $K$ are [subgroups](/page/Subgroup) of $G$, they contain the same identity element $e$, and they are closed under inverses and multiplication. We define the proposed action map as
\begin{align*}
\alpha : (H \times K) \times G &\to G \\
((h,k),g) &\mapsto h g k^{-1}.
\end{align*}
This is a well-defined map into $G$: if $h \in H$, $k \in K$, and $g \in G$, then $h \in G$, $k^{-1} \in K \le G$, and the product $h g k^{-1}$ lies in $G$ by closure of the group operation.
We now verify the two axioms in the definition of a left [group action](/page/Group%20Action). First, the identity element of the direct product group $H \times K$ is $(e,e)$. For every $g \in G$,
\begin{align*}
\alpha((e,e),g) = e g e^{-1} = e g e = g.
\end{align*}
So the identity of $H \times K$ acts as the identity map on $G$.
Second, we verify compatibility with multiplication in $H \times K$. Let $(h_1,k_1),(h_2,k_2) \in H \times K$ and let $g \in G$. The group law on $H \times K$ is componentwise, hence
\begin{align*}
(h_1,k_1)(h_2,k_2) = (h_1h_2,k_1k_2).
\end{align*}
Applying $\alpha$ gives
\begin{align*}
\alpha((h_1,k_1)(h_2,k_2),g)
&= \alpha((h_1h_2,k_1k_2),g) \\
&= h_1h_2 g (k_1k_2)^{-1}.
\end{align*}
The inverse of a product reverses order, so $(k_1k_2)^{-1}=k_2^{-1}k_1^{-1}$. Therefore
\begin{align*}
\alpha((h_1,k_1)(h_2,k_2),g)
&= h_1h_2 g k_2^{-1}k_1^{-1} \\
&= h_1(h_2 g k_2^{-1})k_1^{-1} \\
&= \alpha((h_1,k_1),\alpha((h_2,k_2),g)).
\end{align*}
This proves the compatibility axiom. Hence $\alpha$ is a left action of $H \times K$ on $G$.[/guided]