I have a problem when I am proving the following question:
Let $f:A \to A'$ be a surjective homomorphism of rings, and assume that $A$ is local, $A' \neq 0$, show that $A'$ is local.
I have found an answer in this question. However in my proof, suppose that $\mathfrak{m}$ is the unique maximal ideal in $A$, and I have proved that $f(\mathfrak{m})$ is an ideal and contains any other ideals. To finish this proof, I should prove $f(\mathfrak{m})\neq A'$. But I can't prove $f(1)\notin f(\mathfrak{m})$.
For example, let $g:\mathbb{Z}\oplus \mathbb{Z} \to \mathbb{Z}$ be the natural projection onto its first coordinate. We know $\mathbb{Z}\oplus 2\mathbb{Z}$ is a maximal ideal in $A$, but $g((1,1)) \in g(\mathbb{Z}\oplus 2\mathbb{Z})$.So it's not true for a general ring.
Is there any direct way to prove $f(1)\notin f(\mathfrak{m})$ for a local ring?
Note that $f(1) = 1$, or more explicitly $f(1_A) = 1_{A'}$. Using the hypothesis that $A' \neq 0$, we have $1_{A'} \neq 0$. Therefore $1_A \notin \ker(f)$.
Therefore $\ker(f)$ is a proper ideal of $A$. Using the hypothesis that $A$ is a local ring, we have $\ker(f) \subseteq \mathfrak{m}$.
For any $x \in \mathfrak{m}$, we have $1-x \notin \mathfrak{m}$ (prove this by contrapositive: $x,1-x \in \mathfrak{m} \implies 1 \in \mathfrak{m}$). Therefore $1-x \notin \ker(f)$, so $f(1-x) \neq 0$, so $f(x) \neq f(1)$. This shows that $f(1) \notin f(\mathfrak{m})$.