I am trying to prove the above theorem, I think I can do the backward direction. I wanted to be sure about the forward direction:
$(\implies)$ Suppose $F$ is a fibration. Then since fibrations are closed under composition, condition $(1)$ follows. To see that $F$ is a cartesian functor, consider a $Q$-cartesian morphism $\varphi \colon Z \to Y$ in $\mathbf{Y}$ over $P(f)$ where $f \colon X \to FY$ is $P$-cartesian over $P(f)$ such that $P(F(\varphi)) = Q(\varphi)=P(f)$. Since both maps are cartesian over $P(f)$, we have $f \cong F(\varphi)$. To show condition $(2)$, if we suppose $F_J \colon Y_J \to X_J$ is a fibration and $u \colon X_I \to X_J$ is a functor. The pullback of $F_J$ along $u$ is also a fibration. So $F_I$ is a fibration. Because $F$ is cartesian functor (from $(1)$), it follows that $u^* \colon Y_I \to Y_J$ is cartesian. Hence the square is a morphism in $\mathbf{Fib}$.