If I know the following definition and how to prove(a) in the following problem:
DEFINITION.
If $\mathcal{B}$ is a disjoint cover of $X,$ then we can define a function $$f_{\mathcal{B}}: X \rightarrow \mathcal{B},$$given by the formula $$f_{\mathcal{B}}(x) = \textbf{the unique $B \in \mathcal{B}$ such that $x \in B$}.$$And to get some topology involved, we give $\mathcal{B}$ the discrete topology.
problem:
Let $X$ be a space and let $\mathcal{B}$ be a disjoint cover of $X.$
$(a)$ Show that $f_{\mathcal{B}}$ is continuous iff $\mathcal{B}$ is a clopen cover of $X.$
Now, I want to prove that:
$(b)$ Suppose $\mathcal{A}$ and $\mathcal{B}$ are both disjoint clopen covers of $X,$ so that we have two continuous functions $f_{\mathcal{A}}: X \rightarrow \mathcal{A}$ and $f_{\mathcal{B}}: X \rightarrow \mathcal{B}.$ Show that there can be at most one function $\phi : \mathcal{B} \rightarrow \mathcal{A}$ making the diagram below commute(i.e., such that $\phi \circ f_{\mathcal{B}} = f_{\mathcal{A}}$)
Could anyone help me in proving this, please?

Ok, suppose we had two functions, $\phi$ and $\psi$, making the diagram commute. Then for any $B\in\mathcal B$, we have $\phi(B)=f_A(f_B^{-1}(B))=\psi(B)$.
Note, we don't always have such a function. For instance, if there is an element $B\in\mathcal B$ for which $f^{-1}(B)$ is not contained entirely in one element $A\in \mathcal A$.. In other words, $\mathcal B$ needs to be a refinement of $\mathcal A$.