Let $R$ be a $k$-algebra and let $(R',\phi)$ be an extension of $R$ by a the $k$-algebra $R'$ by the ideal $I \subseteq R'$ such that $I^2=(0)$.
Let $B$ be another $k$-algebra and assume there exist two $k$-algebra morphisms $f_1, f_2: B \to R'$ such that $\phi f_1= \phi f_2$. Then clearly $f_1 - f_2: B \to I$. It is now claimed that $f_1 - f_2$ is a $k$-derivation of $B$ taking values in the $B$-module $I$.
I am really struggling to see this.
If we let $\psi=f_1 - f_2$, then naturally $I$ is a $B$-module (algebra) via the $k$-algebra morphism $\psi: B \to I$.
I feel like the trick to proving this statement is to somehow specify a particular $B$-module structure on $I$. I'm not sure though, I am at a loss because this seems like some sort of trick that I haven't seen.
$\textbf{My Attempt:}$ All, I know at this point is that if $b,b' \in B$, then $\psi(bb')=0$. Therefore, $\psi : B/B^2 \to I$. Now $B/B^2 = k + k \cdot \{ \text{generators of} B \}$. Since $\psi$ vanishes on $k$, $\psi: k \cdot \{ \text{generators of} \ B \} \to I$.
Then $\psi$ is sort of stupidly a derivation since $\psi (k g): k \psi(g)$ where $g$ is a generator of $B$. However, there are no products in this domain so there is nothing else to prove.
You are right, there is another $B$-module structure on $I$!
In fact, a priori there are two different structures. Since $f_1$ and $f_2$ are $k$-algebra morphisms, there are induced actions on the ideal $I \subset R'$ given by
$b \cdot_1 m = f_1(b)m \qquad \mbox{and} \qquad b \cdot_2 m = f_2(b)m$
for $m \in I$ (the multiplication on the right-hand side of the equalities is of course in $R'$).
However, since $\phi f_1 = \phi f_2$, we have $(f_1-f_2)(B) \subset \ker \phi = I$, and as $I^2 = (0)$, it follows that $(f_1(b)-f_2(b))m = 0$, so that $f_1(b)m = f_2(b)m$.
Therefore, the two actions above coincide, and we get a single structure of $B$-module on $I$ via
$b \cdot m = f_1(b)m = f_2(b)m$.
Now verify that $\psi = f_1 - f_2 : B \rightarrow I$ is a $k$-derivation: