Let $f: A\to B$ be a homomorphism of commutative rings, then $B$ is both an $A$-module, and a module over $\mathop{im} f \cong A/\mathop{ker} f$.
Consider the annihilator ideal $$ \operatorname{Ann}_A(B) = \{ a \in A \mid \forall b \in B: f(a)b = 0 \}. $$ Clearly we have $\ker f \subset \operatorname{Ann}_A(B) \subset A$.
We can also define $$ \operatorname{Ann}_{A/\ker f}(B) = \{ a \in A/\ker f \mid \forall b \in B: f(a)b = 0 \}. $$
Is $\operatorname{Ann}_A(B) / \ker f \cong \operatorname{Ann}_{A/\ker f}(B)$?
Yes, of course.
The two module structures are compatible in the sense that $a\cdot b=f(a)b=[a] _{\ker f}\cdot b$.
So that, we have a surjective map $\varphi:\mathrm{Ann}_A(B)\to \mathrm{Ann}_{A/\ker f}(B), \ \ a\mapsto [a]_{\ker f}$ with kernel $\ker f$.