residually finite semidirect product Problem

Let $G=N \rtimes_{\phi} Q$ where $N\lhd G$ finitely generated and residually finite and $Q$ residually finite. Show that $G$ is residually finite

Attempt
I know that

*

*$N$ residually finite and f.g. implies $N$ is Hopfian


*$N$ residually finite and f.g. implies $Aut(N)$ is residually finite.
If $1\not= nq \in G$ with $q\not=1$ then $nq\mapsto qN \not=1$ under the projection $G\to G/N\cong Q$ and then $\exists K$ finite and $t: Q\to K$ s.t. $t(q)\not=1$.
Hence it remains to deal with the case where $1\not=nq\in G$ and $q=1$ i.e. $qn=n\in N$. I know that $\exists K$ finite and $t:N\to K$ s.t. $t(n)\not=1$ but can I factor this homomorphism through $G$ in any way?
I know that the proof is in "On homomorphisms onto finite groups (1958)" by Mal'cev but I can't find the article.

Since $N$ is finitely generated and $K$ is finite, there are only finitely many group homomorphisms $N \to K$.
So the intersection $L$ of their kernels has finite index in $N$, and it is characteristic in $N$ and hence normal in $G$. Then $LQ$ has finite index in $G$ and does not contain $N$.
