Suppose that we have two local rings $(R_1,\mathfrak{m}_1),(R_2,\mathfrak{m}_2)$ where $R_2$ is reduced and two local homomorphisms $\phi,\psi \colon R_1 \to R_2$ such that
$R_1\overset{\phi}{\to} R_2\overset{p}{\to} R_2/\mathfrak{m}_2$ and
$R_1\overset{\psi}{\to} R_2\overset{p}{\to} R_2/\mathfrak{m}_2$
agree, then is it true that $\phi=\psi$?
I can give more information about the problem in case it is an XY-problem but i think that this is a purely algebraic fact.
My work so far is that for every $r\in R_1$ we have that $p(\phi(r)-\psi(r))\in \mathfrak{m}_2$ and that (trying to get a contradiction) if $\phi\neq\psi$ then there exists an $r\in R_1$ such that $\phi(r)-\psi(r)\neq0$ i.e $\phi(r)-\psi(r)\notin (0)=\sqrt{(0)}=\bigcap_{\mathfrak{p}\colon\text{prime in}\ R_2}\mathfrak{p}$ which implies that there exists a prime ideal in $R_2$, say $\mathfrak{q}$ such that $\phi(r)-\psi(r)\notin \mathfrak{q}$ but these facts do not seem to get me anywhere. Can anyone help?