Actually, it looks to me that there's a conflation of two different issues. According to the boxed statement in the OP, we just have to exhibit a functor $h^\ast: \mathbf{C}/C' \to \mathbf{C}/C$$h^\ast: \mathbf{C}/C \to \mathbf{C}/C'$ for a fixed morphism $h: C \to C'$$h: C' \to C$. We are not being asked to prove that we can choose a strict functor (as opposed to a pseudofunctor)
$$\mathbf{C}^{op} \to Cat$$
which takes each object $C$ to the slice $\mathbf{C}/C$, and morphisms $h$ to pullback functors, which appears to be the issue Andrej is discussing.
The issue being discussed in the boxed statement is easy, and can be boiled down to this: if $\mathbf{C}$ has pullbacks, then for each $h: C \to C'$$h: C' \to C$ the pushforward functor $\sum_h: \mathbf{C}/C \to \mathbf{C}/C'$$\sum_h: \mathbf{C}/C' \to \mathbf{C}/C$ (taking each object $f: X \to C$$f: X \to C'$ in the domain to the object $h \circ f: X \to C'$$h \circ f: X \to C$ in the codomain, and similarlydefined in the obvious way on morphisms) has a right adjoint (which is of course a functor) $h^\ast$. Here we need only choose a pullback object $h^\ast g$ in $\mathbf{C}/C'$ for each object $g: Y \to C'$$g: Y \to C$ in $\mathbf{C}/C'$$\mathbf{C}/C$, and then define $h^\ast$ on morphisms in the way dictated by the universal property. In other words, any choice of pullback $h^\ast g$, one for each object $g$ in $\mathbf{C}/C'$$\mathbf{C}/C$, defines a universal arrow
$$\Phi_g: \sum_h (h^\ast g) \to g$$
so that having made these choices and given a morphism $f: g \to g'$ in $\mathbf{C}/C'$$\mathbf{C}/C$ (i.e., a commutative triangle), we may then define $h^\ast f: h^\ast g \to h^\ast g'$ to be the unique arrow such that
$$\Phi_{g'} \circ \sum_h (h^\ast f) = f \circ \Phi_g$$
and functoriality of $h^\ast$ is assured by the usual universal arguments.
Edit: For example, let us show $h^\ast$ preserves compositions. Suppose given morphisms $f: g \to g'$ and $f': g' \to g''$ in $\mathbf{C}/C$. Then $h^\ast (f' \circ f)$ is the unique arrow $h^\ast g \to h^\ast g''$ such that
$$\Phi_{g''} \circ \sum_h h^\ast(f' \circ f) = f' \circ f \circ \Phi_g.$$
On the other hand,
$$ \Phi_{g''} \circ \sum_h (h^\ast f' \circ h^\ast f) = \Phi_{g''} \circ (\sum_h h^\ast f') \circ (\sum_h h^\ast f) = f' \circ \Phi_{g'} \circ (\sum_h h^\ast f) = f' \circ f \circ \Phi_g $$
and so, by uniqueness, $h^\ast (f' \circ f) = (h^\ast f') \circ (h^\ast f)$.