a. $\begin{matrix} A&\xrightarrow\varphi&A\\ \downarrow\scriptstyle\pi&&\downarrow\scriptstyle\pi\\ B&\overset\psi\Rightarrow&B \end{matrix}$
We will call the proposition about the existence of $\psi$ (i) and the one about the kernel of $\pi$ (ii). Firstly, let's assume (i) holds to deduce (ii): $\pi\circ\varphi(f)=\psi\circ\pi(f)$, and if $\pi(f)=\hat0$, since $\psi$ is a morphism, $\psi\circ\pi(f)=\hat0$, and so $\pi\circ\varphi(f)=\hat0$.
For the converse implication, let $\hat g\in B$ such that, for some $f_0\in A$, $\pi(f_0)=\hat g$. Therefore, $\psi(\hat g)=\pi\circ\varphi(f_0)$. We must check if $\psi$ is well defined. Let us choose $f_1\in A\setminus\{f_0\}$ with $\pi(f_1)=\hat g$ as well. $\begin{align} &\pi(f_1)=\pi(f_0)\\ &\pi(f_1)-\pi(f_0)=\pi(f_1-f_0)=\hat0\quad, \end{align}$ which, by (ii), means that $\begin{align} &\pi\circ\varphi(f_1-f_0)=\hat0\\ &\pi(\varphi(f_1)-\varphi(f_0))=\pi(\varphi(f_1))-\pi(\varphi(f_0))=\hat0\\ &\pi\circ\varphi(f_0)=\pi\circ\varphi(f_1)\quad, \end{align}$ so that for every $f\in A$ such that $\pi(f)=\hat g$, $\psi(\hat g)=\pi\circ\varphi(f)$.
It lacks us to prove $\psi$ is a ring morphism. Let $\star\in\{+,\cdot\}$ and $i\in\{1,2\}$, and let us define $\pi(f_i)\triangleq\hat g_i$. From $\psi(\hat g_i)=\pi\circ\varphi(f_i)$, we conclude that $\begin{align} \psi(\hat g_1)\star\psi(\hat g_2)&=\pi(\varphi(f_1)\star\varphi(f_2))=\\ &=\pi(\varphi(f_1\star f_2))=\\ &=\psi\circ\pi(f_1\star f_2)=\\ &=\psi(\pi(f_1)\star\pi(f_2))=\\ &=\psi(\hat g_1\star\hat g_2)\quad, \end{align}$ quod erat demonstrandum. The propositions (i) and (ii) are equivalent.
b. If there is a $\psi$ with the property required, its uniqueness comes from the 2nd paragraph of the previous item.