Let $A$ be a subring and $B$ be an ideal of a ring $R$. I'm trying to prove the second isomorphism theorem for ring, which state that $$A/(A \cap B) \cong (A+B)/B$$
So I have defined a map $$f: A \longrightarrow R/B$$ $$f(a) = a + B$$ clearly $f$ is a ring homomorphism. Since $ker(f) = A \cap B$ , the result follow once I show that $im(f) =(A+B)/B$ by the first isomorphism theorem.
So \begin{align} im(f) & = \{f(a) : a \in A\} & (1)\\ & = \{a + B : a \in A\} & (2) \\ & = \{a + b + B : a \in A, b \in B\} & (3) \\ & = (A + B)/B & (4) \end{align}
question:
is this valid? (specifically (2) to (3))
is it true that $A/B \cong (A + B)/B$