I know this question is a bit old and already has an answer with a reference, but I have been thinking about something related lately (see this question) and think I can provide some details. I'm mostly doing this for my own benefit. First, to see if anyone who knows more than I do can verify that it is correct, and second to see if it gins up more interest in my own question above. (I'm very new to MathOverflow, so I apologize in advance if any of this is bad manners)
For ease of exposition, I will assume that both $f$ and $g$ are fibrations with fibers $F$ and $G$, respectively. I think this is not too strong of an assumption since I believe we can just replace $f$ and $g$ with equivalent fibrations.
We proceed inductively, with the base case corresponding to standard covering space theory.
More precisely, the first stage in the Moore-Postnikov towers $X_1$ and $Y_1$ are just the covers of $A$ and $B$ associated to the subgroups of $\pi_1(A)$ and $\pi_1(B)$ coming from the images of $f_\ast:\pi_1(X)\to \pi_1(A)$ and $g_\ast:\pi_1(Y)\to \pi_1(B)$, respectively. Thus a the map $\Phi_1:X_1\to Y_1$ corresponds to a lift of
$$
\require{AMScd}
\begin{CD}
@. @. Y_1\\
@. @. @VVV\\
X_1 @>{p_1}>> A @>{\phi}>> B
\end{CD}
$$
By the original commutative diagram we know that $\Psi_\ast\circ (p_1)_\ast(\pi_1(X_2))\subset g_\ast(\pi_1(Y))$, and so by standard covering space theory, a lift exist. Furthermore, once basepoints have been fixed, this lift is unique.
For the inductive step, assume that we have $\Phi_n:X_n\to Y_n$. Given the diagram
$$
\require{AMScd}
\begin{CD}
X_{n+1} @. Y_{n+1}\\
@V{p_n}VV @V{q_n}VV\\
X_n @>{\Phi_n}>> Y_n
\end{CD}
$$
we want to understand the obstruction to lifting $\Phi_n\circ p_n$ to $Y_{n+1}$.
By the principality assumption of the Moore-Postnikov tower, we know that $Y_{n+1}\to Y_n$ is obtained as the pullback of a unique (up to homotopy) diagram
$$
\require{AMScd}
\begin{CD}
Y_{n+1} @>>> PK(\pi_n(G),n+1)\\
@VVV @VVV\\
Y_n @>{o_{n+1}}>>K(\pi_n(G),n+1)
\end{CD}
,$$
where $PK(\pi_n(G),n+1)$ is the path space fibration.
The map $o_{n+1}$ corresponds to a cohomology class $[o_{n+1}]\in H^{n+1}(Y_n,\pi_n(G))$ and the obstruction to lifting $p_n\circ \Phi_n$ is given by the class $p_n^\ast \Phi_n^\ast([o_{n+1}])$, which we now show is trivial.
For each $n$, let $\iota_n:Y\to Y_n$ and $j_n: X\to X_n$ be the maps into the various levels of the towers. Notice, that $\iota_n^\ast([o_{n+1}]$ is the obstruction to lifting $\iota_n:Y\to Y_n$ to $Y_{n+1}$, but $\iota_{n+1}$ is such a lift and so $\iota_n^\ast([o_{n+1}]=0$. Consequently, $\phi^\ast\iota_n^\ast([o_{n+1}])=0\in H^{n+1}(X,\pi_n(Y_n))$.
By commutativity of all the diagrams we have
$$
j_{n+1}^\ast p_n^\ast \Phi_n^\ast([o_{n+1}])=j_n^\ast\Phi_n^\ast([o_{n+1}])=\phi^\ast\iota_n^\ast([o_{n+1}])=0
$$
If we can show that $j_{n+1}^\ast:H^{n+1}(X_{n+1},\pi_n(Y_n))\to H^{n+1}(X,\pi_n(Y_n))$ is an isomorphism, this implies that $p_n^\ast\Phi_n^\ast([o_{n+1}])=0$ and that $\Phi_{n+1}:X_{n+1}\to Y_{n+1}$ exists.
Replacing $j_{n+1}$ with a mapping cylinder, the properties of the tower imply that $(X_{n+1},X)$ is $(n+1)$-connected. This implies that $j_{n+1}^\ast$ is a isomorphism (see the proof of 4.21 in Hatcher).
At this point, the only lingering question is about the uniqueness of the lift $\Phi_{n+1}:X_{n+1}\to Y_{n+1}$ of $\Phi_n$. However, I think that the different lifts will be parameterized by elements of $H^n(X_n,X,\pi_n(Y_n))$ (or something similar), which is also trivial. Hence the lift should be unique.