Let $FM = {\rm Hom}(D,M)$ for each module $M$. You can show the following are equivalent
$(1)$ Whenever $0\longrightarrow M'\stackrel{\psi}\longrightarrow M\stackrel{\phi}\longrightarrow M''\longrightarrow 0$ is exact, the sequence $$\tag{*} 0\longrightarrow FM'\stackrel{\psi'}\longrightarrow FM \stackrel{\phi'}\longrightarrow FM''\longrightarrow 0$$ is exact.
$(2)$ Whenever we have a surjection $M\stackrel{f}\longrightarrow N\longrightarrow 0$ and a map $D \stackrel{h}\longrightarrow N$, there exists a map $D \stackrel{\hat h}\longrightarrow M$ such that $f\hat h=h$.
The above is a restatement that the induced map ${\rm Hom}(D,M)\stackrel{\bar f}\longrightarrow{\rm Hom}(D,N)$, which sends $h:D\to M$ to $fh:D\to N$ is surjective. Since the sequence $(*)$ is always exact at the two first places, saying it is exact is the same as saying condition $(2)$ holds.
Let's assume this condition holds, and consider an exact sequence $$0\longrightarrow M'\stackrel{\psi}\longrightarrow M\stackrel{\phi}\longrightarrow M''\longrightarrow 0$$
Saying that $(*)$ is exact means there is an isomorphism $FM/(\psi')(FM')\longleftrightarrow FM''$ which takes (the class of) an element of $FM$, i.e. $h:D\to M$; and sends it to $\phi h :D\to M''$, and where we identify $h,h':D\to M$ if they are such that $h-h'$ has the form $\psi j$ for some $j:D\longrightarrow M'$. This means that the correstrictions of $h$ and $h'$ to $f(M')$ agree.
This is what D&F are saying: if the sequence is exact, a morphism $F:D\to M$ is uniquely determined by the induced morphism $\phi F=\phi'(F)$ and the correstriction of $F$ to $\psi(M')$.
The only particular detail is the following: suppose that $h,h':D\to M$ are such that, whenever $h(x),h'(x)\in \psi(M')$, then $h(x)=h(x')$. Then there is a morphism $j:D\to M'$ such that $h-h'=\psi j$. Indeed, for each $x$, we have a unique $y\in D$ such that $hx=hx'=\psi y$, since $\psi$ is injective. Call this $y=jx$. Since $h,h',\psi$ are module morphisms, so is $j$. For example, if $hx=h'x=\psi y$ and $hw=h'w=\psi y'$, then summing gives $h(x+w)=h'(x+w)=\psi(y+y')$, and by uniqueness $jx+jx'=j(x+x')$. Similarly, $j(ax)=a j(x)$. The other direction is easy, of course: if $h-h'=\psi j$, they will both correstrict to the same map.
Thus, the bijection is induced by the isomorphism obtained from the exact sequence of homs.
Can you show the converse holds?