Implication of closed diagonal in product space. I have to prove (b) implies (c) in the following.

Here's my attempt to prove the [<=] direction of (c). I get stuck in one particular step listed out below.
Let $z \in Z$, $z \notin D$. Assume for a contradiction that $f_1(z) \neq f_2(z)$. Then $(f_1(z),f_2(z)) \notin \Delta(X)$. Since $\Delta(X)$ is closed, there exists an open set $U \in (X \times X), U \ni (f_1(z),f_2(z)) \ \text{s.t.} \ U \cap \Delta(X) = \emptyset$. Let $pr_1(U) = U_1, pr_2(U) = U_2$, where $pr_1$ and $pr_2$ are the projections from $(X \times X)$ to the first and second coordinates, respectively. Then $U_1 \cap U_2 = \emptyset$, since otherwise $U \cap \Delta(X) \neq \emptyset$, hence contradiction. Also $U_1 \ni f_1(z),\text{ and } U_2 \ni f_2(z)$.
It's here that I got stuck, since I need, but cannot prove the existence of, a set $V$open in $Z$, $V \ni z$, and $V \subset f_1^{-1}(U_1) \cap f_2^{-1}(U_2)$.
====================================================================
Edit: Next I'd have to show that (c) implies that X is Hausdorff. I'd like a hint for this direction.
 A: So we have open $U,V$ in $X$ with $(f_1(z), f_2(z)) \in U \times V$ and $(U \times V) \cap \Delta(X)=\emptyset$. (You call $U$, $U_1$ and $V$, $U_2$)
This indeed implies $U \cap V = \emptyset$, as stated. So by continuity of $f_1$ and $f_2$ we have that $f_1^{-1}[U] \cap f_2^{-1}[V]$ is open and contains $z$, so is non-empty. Hence that set intersects the dense set $D$, and we have some
$$d \in D \cap f_1^{-1}[U] \cap f_2^{-1}[V]$$
and for this $d$ we have $f_1(d) \in U$, $f_2(d) \in V$ so $f_1(d) \neq f_2(d)$ (by the disjointness of $U$ and $V$) and this contradicts $f_1\restriction_D = f_2\restriction_D$.
Another, simpler, proof is the following: Note that $F:Z \to X \times X, F(x)=(f_1(x),f_2(x))$ is continuous whenever $f_1$ and $f_2$ are (as the composition with the projections are continuous). So assuming (b), $F^{-1}[\Delta(X)]$ is closed in $Z$ and by asssumption (if we do the backward implication again) contains $D$ and so $Z=\overline{D} \subseteq F^{-1}[\Delta(X)]$ which implies $f_1= f_2$.
