Let $x, y$ be objects of $\mathcal{S}$ lying over the same object $U$. Consider the commutative diagram $$ \xymatrix{ \Mor_\mathcal{S}(x, y) \ar[rd]_p \ar[rr]_G & & \Mor_{\mathcal{S}'}(G(x), G(y)) \ar[ld]^{p'} \\ & \Mor_\mathcal{C}(U, U) & } $$ From this diagram it is clear that if $G$ is faithful (resp.\ fully faithful) then so is each $G_U$. \medskip\noindent Suppose $G$ is an equivalence. For every object $x'$ of $\mathcal{S}'$ there exists an object $x$ of $\mathcal{S}$ such that $G(x)$ is isomorphic to $x'$. Suppose that $x'$ lies over $U'$ and $x$ lies over $U$. Then there is an isomorphism $f : U' \to U$ in $\mathcal{C}$, namely, $p'$ applied to the isomorphism $x' \to G(x)$. By the axioms of a category fibred in groupoids there exists an arrow $f^*x \to x$ of $\mathcal{S}$ lying over $f$. Hence there exists an isomorphism $\alpha : x' \to G(f^*x)$ such that $p'(\alpha) = \text{id}_{U'}$ (this time by the axioms for $\mathcal{S}'$). All in all we conclude that for every object $x'$ of $\mathcal{S}'$ we can choose a pair $(o_{x'}, \alpha_{x'})$ consisting of an object $o_{x'}$ of $\mathcal{S}$ and an isomorphism $\alpha_{x'} : x' \to G(o_{x'})$ with $p'(\alpha_{x'}) = \text{id}_{p'(x')}$. From this point on we proceed as usual (see proof of Lemma \ref{lemma-equivalence-categories}) to produce an inverse functor $F : \mathcal{S}' \to \mathcal{S}$, by taking $x' \mapsto o_{x'}$ and $\varphi' : x' \to y'$ to the unique arrow $\varphi_{\varphi'} : o_{x'} \to o_{y'}$ with $\alpha_{y'}^{-1} \circ G(\varphi_{\varphi'}) \circ \alpha_{x'} = \varphi'$. With these choices $F$ is a functor over $\mathcal{C}$. We omit the verification that $G \circ F$ and $F \circ G$ are $2$-isomorphic to the respective identity functors (in the $2$-category of categories fibred in groupoids over $\mathcal{C}$). \medskip\noindent Suppose that $G_U$ is faithful (resp.\ fully faithful) for all $U\in\Ob(\mathcal C)$. To show that $G$ is faithful (resp.\ fully faithful) we have to show for any objects $x, y\in\Ob(\mathcal{S})$ that $G$ induces an injection (resp.\ bijection) between $\Mor_\mathcal{S}(x, y)$ and $\Mor_{\mathcal{S}'}(G(x), G(y))$. Set $U = p(x)$ and $V = p(y)$. It suffices to prove that $G$ induces an injection (resp.\ bijection) between morphism $x \to y$ lying over $f$ to morphisms $G(x) \to G(y)$ lying over $f$ for any morphism $f : U \to V$. Now fix $f : U \to V$. Denote $f^*y \to y$ a pullback. Then also $G(f^*y) \to G(y)$ is a pullback. The set of morphisms from $x$ to $y$ lying over $f$ is bijective to the set of morphisms between $x$ and $f^*y$ lying over $\text{id}_U$. (By the second axiom of a category fibred in groupoids.) Similarly the set of morphisms from $G(x)$ to $G(y)$ lying over $f$ is bijective to the set of morphisms between $G(x)$ and $G(f^*y)$ lying over $\text{id}_U$. Hence the fact that $G_U$ is faithful (resp.\ fully faithful) gives the desired result. \medskip\noindent Finally suppose for all $G_U$ is an equivalence for all $U$, so it is fully faithful and essentially surjective.  We have seen this implies $G$ is fully faithful, and thus to prove it is an equivalence we have to prove that it is essentially surjective.  This is clear, for if $z'\in \Ob(\mathcal{S}')$ then $z'\in \Ob(\mathcal{S}'_U)$ where $U = p'(z')$.  Since $G_U$ is essentially surjective we know that $z'$ is isomorphic, in $\mathcal{S}'_U$, to an object of the form $G_U(z)$ for some $z\in \Ob(\mathcal{S}_U)$.  But morphisms in $\mathcal{S}'_U$ are morphisms in $\mathcal{S}'$ and hence $z'$ is isomorphic to $G(z)$ in $\mathcal{S}'$.