Determine whether the following is true or false. Note that $\cong$ means group isomorphic.
Question: Is it true that if $H,K$ are two normal subgroups of $G$ such that $G=HK$ an $H\cap K = \{1\},$ then $G/H \cong K?$
My attempt: I think the statement is true.
Since $G=HK,$ for every $g\in G,$ there exists $h\in H$ an $k\in K$ such that $g=hk.$ Define $\phi:G\to K$ by $$\phi(g) = h^{-1}g.$$ Note that $h^{-1}g\in K.$ If $g$ has two representations, say $g= h_1k_1 = h_2k_2,$ then $h_2^{-1}h_1= k_2k_1^{-1}.$ Since $H\cap K = \{1\},$ so $h_2^{-1}h_1 = 1,$ which implies that $h_1=h_2.$ So $\phi$ is well-defined. Note that kernel of $\phi$ is $H$ and $\phi$ is surjective. By first isomorphism theorem for group, we have $$G/ H \cong K.$$
Is my attempt correct?
On the other hand, I notice that $G$ is the internal direct product of $H$ and $K.$ Therefore, $G \cong H\times K.$ Can I conclude here that $G/H\cong K?$