This seems to be one of those situations where instead of trying to follow someone else's proof and someone else's notation, it's easier just to sit down and work out the proof by oneself, by considering first the case $\mathcal{C} = Set$ just to get one's bearing on what the construction should be, and then following one's nose.
So I'm not sure the following will help, but for anyone trying to follow: taking $\mathcal{C} = Set$ and a function $f: X \to Y$, the functor $\prod_f: Set/X \to Set/Y$ should intuitively take an object $p: E \to X$ to the object in $Set/Y$ whose fiber over an element $y \in Y$ is given by the formula
$\prod_f(E \stackrel{p}{\to} X)_y := \prod_{f(x) = y} p^{-1}(x)$
where the object on the right is the set of partial sections of $p$ over the subset $f^{-1}(y)$. Pulling back $p$ along the subset $f^{-1}(y) \hookrightarrow Y$, this is the set of sections $s$ of the obvious map $(f \circ p)^{-1}(y) \to f^{-1}(y)$ given by restriction of $p$; this set of sections is a pullback
$\begin{array}{&&} P_y & \to & (f \circ p)^{-1}(y))^{f^{-1}(y)} \\ \downarrow & & \downarrow p^{f^{-1}(y)} \\ 1 & \stackrel{[id]}{\to} & f^{-1}(y)^{f^{-1}(y)} \end{array} $
where $[id]$ here names the identity arrow $f^{-1}(y) \to f^{-1}(y)$. Collecting the fibers over all the $y$ together, we are led to an evident pullback diagram in $Set/Y$
$\begin{array}{&&} (P \to Y) & \to & (E \stackrel{f \circ p}{\to} Y)^{(X \stackrel{f}{\to} Y)} \\ \downarrow & & \downarrow p^{(X \stackrel{f}{\to} Y)} \\ (Y \stackrel{1_Y}{\to} Y) & \stackrel{I}{\to} & (X \stackrel{f}{\to} Y)^{(X \stackrel{f}{\to} Y)} \end{array}$
where all the exponentials are computed in $Set/Y$. Generalizing now from $Set$ to any $\mathcal{C}$ whose slices are cartesian closed, we assert this pullback gives the correct formula for $\prod_f (E \stackrel{p}{\to} X)$.
The proof this is correct is easy: a map from $(Q \stackrel{q}{\to} Y)$ into this pullback is tantamount to a commutative diagram
$\begin{array}{&&} (Q \stackrel{q}{\to} Y) & \stackrel{\phi}{\to} & (E \stackrel{f \circ p}{\to} Y)^{(X \stackrel{f}{\to} Y)} \\ \pi \downarrow & & \downarrow p^{(X \stackrel{f}{\to} Y)} \\ (Y \stackrel{1_Y}{\to} Y) & \stackrel{I}{\to} & (X \stackrel{f}{\to} Y)^{(X \stackrel{f}{\to} Y)} \end{array}$
which by the $\times-\hom$ adjunction in $\mathcal{C}/Y$ is tantamount to a commutative diagram in $\mathcal{C}/Y$
$\begin{array}{&&} (Q \stackrel{q}{\to} Y) \times (X \stackrel{f}{\to} Y) & \stackrel{\psi}{\to} & (E \stackrel{f \circ p}{\to} Y) \\ \pi \times id_f \downarrow & & \downarrow p \\ (Y \stackrel{1_Y}{\to} Y) \times (X \stackrel{f}{\to} Y) & \stackrel{proj}{\to} & (X \stackrel{f}{\to} Y) \end{array}$
where of course all products here are given by fiber products in $\mathcal{C}$, and the bottom arrow $proj$ may as well be taken to be the identity on $(X \stackrel{f}{\to} Y)$ since $(Y \stackrel{1_Y}{\to} Y)$ is terminal in $\mathcal{C}/Y$. So the last commutative square boils down to a commutative triangle
$\begin{array}{&&} (Q \stackrel{q}{\to} Y) \times (X \stackrel{f}{\to} Y) & \stackrel{\psi}{\to} & (E \stackrel{f \circ p}{\to} Y) \\ & \pi \searrow & \downarrow p \\ & & (X \stackrel{f}{\to} Y) \end{array}$
whereby this morphism $\psi$ may be interpreted as a morphism in the slice of the slice $(\mathcal{C}/Y)/f$. Under the canonical equivalence $(\mathcal{C}/Y)/f \simeq \mathcal{C}/X$, the datum $\psi$ corresponds precisely an arrow of the form
$\psi: (f^{\ast} q) \to (E \stackrel{p}{\to} X)$
in $\mathcal{C}/X$, and that's exactly what we want: we have established a natural bijection between arrows $\phi: (Q \stackrel{q}{\to} Y) \to \prod_f (E \stackrel{p}{\to} X)$ in $\mathcal{C}/Y$ and arrows $\psi: (f^{\ast} q) \to (E \stackrel{p}{\to} X)$ in $\mathcal{C}/X$.
[Perhaps this is exactly what Awodey says; I don't know, because I haven't seen his proof or have forgotten it if I had.]