Let $\iota$ be the map $N \to M$, let $\pi:M \to M/\mathfrak{m}M$ be the quotient map, and suppose $\pi \circ \iota$ is onto. In this problem $N$ is a submodule of $M$, so $\iota(n)$ is just $n$ thought of as an element of $M$. Let $x \in M$, then $x + \mathfrak{m}M \in \operatorname{im}(\pi\circ\iota)$, so $x + \mathfrak{m}M = \pi(\iota(n)) = n + \mathfrak{m}M$ for some $n \in N$. Therefore $x-n \in \mathfrak{m}M$, and $x = n + y$ for some $y \in \mathfrak{m}M$. We have written an arbitrary element of $M$ as a sum of something in $N$ and something in $\mathfrak{m}M$, therefore $M = N+\mathfrak{m}M$.