Here is an argument from the cases of sets to presheaves to sheaves. It should not be counted as category-theoretic proof. But I believe it catches some essential part of a category-theoretic proof. A generalized statement in category theory may contain some more construction like locale or other structures. (An reference may be Borceus's Handbook of Categorical Algebra Vol 3, Categories on Sheaves Section 2.12. It's named Change of Base, as ChirsH hinted.)
First observe that one has a similar setting: given a map $f: A \to B$ of sets. The map $f$ induces direct image and inverse image functors $f_∗: PA → PB$ and $f^{−1}: PB → PA$. Here $PA$ and $PB$ are the power sets of $A$ and $B$ respectively, treated as posets. $f_*$ takes any subset $S$ of $A$ to $f(S)$ of $B$ and $f^{-1}$ takes any subset $T$ of $B$ of $f^{-1}(T)$ of $A$. Then $(f_*, f^{-1})$ forms an adjoint pair: $f(S) \subset T$ if and only if $S \subset f^{-1}(T)$. (cf. Riehl’s Category in Context Example 4.18).
With this similar setting, one can perform Vakil’s definition of the push-pull map similarly: Given a commutative diagram in the category sets as follow and $F$ is a subset of $X$.
$$
\begin{CD}
W @>{\beta'}>> X \\
@V{\alpha'}VV @VV{\alpha}V \\
Y @>>{\beta}> Z
\end{CD}
$$
one can define the push-pull map $\alpha^\prime_*(\beta^\prime)^{-1} F \to \beta^{-1}\alpha_*F$ in two ways(here the map is in fact just the inclusion of two subsets of $Y$)
as the definition in 2.7.4 of Vakil’s FOAG, starting with the identity $(\beta^\prime)^{-1}F \to (\beta^\prime)^{-1}F$ on $W$, which is just the identity map on the inverse image $(\beta^\prime)^{-1}F$. By adjointness of $(\beta^\prime_*, (\beta^\prime)^{-1}))$, this is the map as the map $\beta^\prime_*(\beta^\prime)^{-1} F \to F$, which in fact says that $\beta^\prime_*(\beta^\prime)^{-1} F \subset F$. Apply $\alpha_*$ to get a map $\alpha_*\beta^\prime_*(\beta^\prime)^{-1} F \to \alpha_*F$. By the commutative diagram, this is $\beta_*\alpha^\prime_*(\beta^\prime)^{-1} F \to \alpha_*F$. By adjointness of $(\beta_*, (\beta)^{-1}))$, this yields a map $\alpha^\prime_*(\beta^\prime)^{-1} F \to \beta^{-1}\alpha_*F$. In fact, it’s just that $\alpha^\prime_*(\beta^\prime)^{-1} F \subset \beta^{-1}\alpha_*F$.
as in exercise 2.7.F, the dual way starts with $\alpha_*F \to \alpha_*F$, and gets $F \to \alpha^{-1}\alpha_{*}F$ using the adjointness of $(\alpha_*, \alpha^{-1})$, and gets $(\beta^\prime)^{-1}F \to (\beta^\prime)^{-1}\alpha^{-1}\alpha^{*}F$. By the commutative diagram, it’s $(\beta^\prime)^{-1}F \to (\alpha^\prime)^{-1}\beta^{-1}\alpha_{*}F$. Using the adjointness of $(\alpha^\prime_*, (\alpha^\prime)^{-1})$, it’s $\alpha^\prime_*(\beta^\prime)^{-1}F \to \beta^{-1}\alpha_{*}F$.
For posets, there is at most one morphism between two objects. Hence for this similar setting, the two construction is the same.
Now move to the case of the category of presheaves. For a continuous map $\pi: X\to Y$, one still has that $(\pi^{-1}_{pre}, \pi_*)$ forms an adjoint pair. Here for a presheaf $\mathscr{G}$ of $Y$, the presheaf $\pi^{-1}_{pre}\mathscr{G}$ is defined by $\pi_{\text {pre }}^{-1} \mathscr{G}(\mathrm{U})=\operatorname{colim}_{V \supset \pi(\mathrm{U})} \mathscr{G}(\mathrm{V})$ for any open set $U$ of $X$. (cf 2.7.2 in Vakil’s FOAG).
Perform two definitions of the push-pull map in the case of the category of presheaves. There are two definitions for the map $\beta^{-1} \alpha_{*} \mathscr{F} \longrightarrow \alpha_{*}^{\prime}\left(\beta^{\prime}\right)^{-1} \mathscr{F}$, i.e., two definitions for the map $(\beta^{-1} \alpha_{*} \mathscr{F})(U) \to(\alpha_{*}^{\prime}\left(\beta^{\prime}\right)^{-1} \mathscr{F})(U)$ for any open set $U$ on $Y$. By definition, $(\beta^{-1} \alpha_{*} \mathscr{F})(U) = \operatorname{colim}_{V \supset \beta(U)} (\alpha_{*}\mathscr{F})(U) = \operatorname{colim}_{V \supset \beta(U)} \mathscr{F}(\alpha^{-1}(V))$ and $(\alpha_{*}^{\prime}\left(\beta^{\prime}\right)^{-1} \mathscr{F})(U) = (\left(\beta^{\prime}\right)^{-1} \mathscr{F})((\alpha^\prime)^{-1}(U)) = \operatorname{colim}_{V \supset \beta^{\prime}((\alpha^\prime)^{-1}(U))} \mathscr{F}(V)$. Hence there are two definitions for the map $\operatorname{colim}_{V \supset \beta(U)} \mathscr{F}(\alpha^{-1}(V)) \to \operatorname{colim}_{V \supset \beta^{\prime}((\alpha^\prime)^{-1}(U))} \mathscr{F}(V)$. Since $V \supset \beta(U)$ if and only if $\alpha^{-1}(V) \supset \alpha^{-1}(\beta(U))$, $\operatorname{colim}_{V \supset \beta(U)} \mathscr{F}(\alpha^{-1}(V))$ is the same as $\operatorname{colim}_{V \supset \alpha^{-1}(\beta(U))} \mathscr{F}(V)$ . By the previous argument on the setting of sets one knows that $\beta^{\prime}((\alpha^\prime)^{-1}(U)) \subset \alpha^{-1}(\beta(U))$. Hence $\{V \supset \alpha^{-1}(\beta(U))\}$ is a sub-filtered set of $\{V \supset \beta^{\prime}((\alpha^\prime)^{-1}(U))\}$ . Hence there is a unique map $\operatorname{colim}_{V \supset \alpha^{-1}(\beta(U))} \mathscr{F}(V) \to \operatorname{colim}_{V \supset \beta^{\prime}((\alpha^\prime)^{-1}(U))} \mathscr{F}(V)$ making the two colimit cones commute. Since both two definitions make it commute, they are the same. The details are:
Back to how $(\pi^{-1}_{pre}, \pi)$ being an adjoint pair, i.e., given $\pi: X \to Y$, the isomorphism between $PSh_X(\pi_{pre}^{-1}\mathscr{G}, \mathscr{F})$ and $PSh_Y(\mathscr{G}, \pi_* \mathscr{F})$:
Given morphism of presheaves $\pi_{pre}^{-1}\mathscr{G} \to\mathscr{F}$, one has $\operatorname{colim}_{V \supset \pi(U)} \mathscr{G}(V) \to \mathscr{F}(U)$ for every open subset $U \subset X$. Replacing it with $\pi^{-1}(U)$ for every open subset $U \subset Y$, one has $\operatorname{colim}_{V \supset \pi(\pi^{-1}(U))} \mathscr{G}(V) \to \mathscr{F}(\pi^{-1}(U))$. Since $U \supset \pi(\pi^{-1}(U))$, one has the colimit component $\mathscr{G}(U) \to \operatorname{colim}_{V \supset \pi(\pi^{-1}(U))} \mathscr{G}(V)$. This two morphisms compose to $\mathscr{G}(U) \to \operatorname{colim}_{V \supset \pi(\pi^{-1}(U))} \mathscr{G}(V)\to \mathscr{F}(\pi^{-1}(U))$ for every open subset $U \subset Y$. Hence a morphism of presheaves $\pi_{pre}^{-1}\mathscr{G} \to\mathscr{F}$ corresponds to a morphism of presheaves $\mathscr{G} \to \pi_*\mathscr{F}$.
Conversely, given a morphism of presheaves $\mathscr{G} \to \pi_*\mathscr{F}$, one has $\mathscr{G}(U) \to \mathscr{F}(\pi^{-1}(U))$ for every open subset $U \subset Y$. Hence, for the filtered set $\{V \supset \pi(U)\}$, here $U$ switches to the notation for an open subset $U \subset X$, one has $\{\mathscr{G}(V) \to \mathscr{F}(\pi^{-1}(V))\}_{V \supset \pi(U)}$. Since $\pi^{-1}(V) \supset \pi(U)$ for every $V \supset \pi(U)$, the restriction of sections $\operatorname{res}: \mathscr{F}(\pi^{-1}(V)) \to \mathscr{F}(U)$ gives a cone: $\{\mathscr{G}(V) \to \mathscr{F}(\pi^{-1}(V))\stackrel{\operatorname{res}}{\rightarrow}\mathscr{F}(U)\}_{V \supset \pi(U)}$. It corresponds to a morphism of $\operatorname{colim}_{V \supset \pi(U)} \mathscr{G}(V) \to \mathscr{F}(U)$. Hence a morphism of presheaves $\mathscr{G} \to \pi_*\mathscr{F}$ corresponds to a morphism of presheaves $\pi_{pre}^{-1}\mathscr{G} \to\mathscr{F}$.
Then for the case in the definition of the push-push map, the identity $\beta^{\prime,-1} \mathscr{F} \to\beta^{\prime,-1} \mathscr{F}$ corresponds to the map $\mathscr{F} \to \beta^{\prime}_*\beta^{\prime, -1}\mathscr{F}$ defined by $\mathscr{F}(U) \to \operatorname{colim}_{V \supset(\beta^{\prime}(\beta^{\prime,-1}(U)))}\mathscr{F}(V) \to (\beta^{\prime, -1}\mathscr{F})(\beta^{\prime,-1}(U))$. Here the second map is just identity, hence it is $\mathscr{F}(U) \to \operatorname{colim}_{V \supset(\beta^{\prime}(\beta^{\prime,-1}(U)))}\mathscr{F}(V)$, i.e., the colimit component map. Then $\alpha_*\mathscr{F} \to \alpha_*\beta^{\prime}_*\beta^{\prime, -1}\mathscr{F}$ is defined by $\mathscr{F}(\alpha^{-1}(U)) \to \operatorname{colim}_{V \supset(\beta^{\prime}(\beta^{\prime,-1}(\alpha^{-1}(U))))}\mathscr{F}(V)$ for every open subset $U \subset Z$. The identity $\alpha_*\beta^{\prime}_* =\beta_*\alpha^{\prime}_*$ corresponds to the fact that $\beta^{\prime,-1}(\alpha^{-1}(U))) = \alpha^{\prime}(\beta^{-1}(U))$. And $\alpha_*\mathscr{F} \to \beta_*\alpha^{\prime}_*\beta^{\prime, -1}\mathscr{F}$ is defined by $\mathscr{F}(\alpha^{-1}(U)) \to \operatorname{colim}_{V \supset(\beta^{\prime}(\alpha^{\prime}(\beta^{-1}(U))))}\mathscr{F}(V)$. It corresponds to $\beta^{-1}\alpha_*\mathscr{F} \to\alpha^{\prime}_*\beta^{\prime, -1}\mathscr{F}$ defined by the cone $\{(\alpha_*\mathscr{F})(V) \to (\alpha^{\prime}_*\beta^{\prime, -1}\mathscr{F})(\beta^{-1}(V)) \stackrel{\operatorname{res}}{\to} (\alpha^{\prime}_*\beta^{\prime, -1}\mathscr{F})(U)\}_{V \supset \beta(U)}$. Here $(\alpha_*\mathscr{F})(V) \to (\alpha^{\prime}_*\beta^{\prime, -1}\mathscr{F})(\beta^{-1}(V))$ is $\mathscr{F}(\alpha^{-1}(V)) \to \operatorname{colim}_{V^\prime \supset(\beta^{\prime}(\beta^{\prime,-1}(\alpha^{-1}(V))))}\mathscr{F}(V^\prime)$ and $(\alpha^{\prime}_*\beta^{\prime, -1}\mathscr{F})(U)$ is $\operatorname{colim}_{V\supset \beta^{\prime}(\alpha^{\prime, -1}(U))} \mathscr{F}(V)$ as in the above discussion. And $\beta^{-1}\alpha_*\mathscr{F} \to\alpha^{\prime}_*\beta^{\prime, -1}\mathscr{F}$ is defined by the cone $\{ \mathscr{F}(\alpha^{-1}(V)) \to \operatorname{colim}_{V^\prime \supset(\beta^{\prime}(\beta^{\prime,-1}(\alpha^{-1}(V))))}\mathscr{F}(V^\prime) \to \operatorname{colim}_{V^\prime\supset \beta^{\prime}(\alpha^{\prime, -1}(U))} \mathscr{F}(V^\prime)\}_{V \supset \beta(U)}$. And as in the above discussion, $V \supset \beta(U)$ if and only if $\alpha^{-1}(V) \supset \alpha^{-1}(\beta(U))$, it is same with the cone $\{ \mathscr{F}(V) \to \operatorname{colim}_{V^\prime \supset(\beta^{\prime}(\beta^{\prime,-1}(V)))}\mathscr{F}(V^\prime) \to \operatorname{colim}_{V^\prime\supset \beta^{\prime}(\alpha^{\prime, -1}(U))} \mathscr{F}(V^\prime)\}_{V \supset \alpha^{-1}(\beta(U))}$, i.e., the same with $\operatorname{colim}_{V \supset \alpha^{-1}(\beta(U))} \mathscr{F}(V) \to \operatorname{colim}_{V^\prime\supset \beta^{\prime}(\alpha^{\prime, -1}(U))} \mathscr{F}(V^\prime)$.
The situation the dual argument is similar: the identity of $\alpha_*\mathscr{F} \to \alpha_*\mathscr{F}$ corresponds to the map $\alpha^{-1}\alpha_*\mathscr{F} \to \mathscr{F}$ defined by the cone $\{\mathscr{F}(\alpha^{-1}(V)) \to \mathscr{F}(\alpha^{-1}(V))\stackrel{\operatorname{res}}{\rightarrow}\mathscr{F}(U)\}_{V \supset \alpha(U)}$. The first map is just identity, hence it’s just the cone $\{ \mathscr{F}(\alpha^{-1}(V))\stackrel{\operatorname{res}}{\rightarrow}\mathscr{F}(U)\}_{V \supset \alpha(U)}$. Then $\beta^{\prime, -1}\alpha^{-1}\alpha_*\mathscr{F} \to \beta^{\prime,-1}\mathscr{F}$ is defined by $\operatorname{colim}_{V \supset \beta^{\prime}(U)}(\alpha^{-1}\alpha_*\mathscr{F})(V) \to \operatorname{colim}_{V \supset \beta^{\prime}(U)}\mathscr{F}(V)$. It corresponds to map of cones $\{(\alpha^{-1}\alpha_*\mathscr{F})(V) \to \mathscr{F}(V)\}_{V \supset \beta^{\prime}(U)}$. And unraveling the definition for $\alpha^{-1}\alpha_*\mathscr{F} \to \mathscr{F}$, one has the diagram
$$
\begin{CD} \mathscr{F}(\alpha^{-1}(V^\prime)) @>{\operatorname{res}}>> \mathscr{F}(V) \\ @V{}VV @|{}V \\ (\alpha^{-1}\alpha_*\mathscr{F})(V) = \operatorname{colim}_{V' \supset \alpha(V)} \mathscr{F}(\alpha^{-1}(V^\prime)) @>>{}> \mathscr{F}(V) \\
@V{}VV @VV{}V \\ \operatorname{colim}_{V \supset \beta^{\prime}(U)}(\alpha^{-1}\alpha_*\mathscr{F})(V) @>>{}> \operatorname{colim}_{V \supset \beta^{\prime}(U)}\mathscr{F}(V)
\end{CD}
$$
. It’s $\operatorname{colim}_{V \supset \beta^{\prime}(U)}(\alpha^{-1}\alpha_*\mathscr{F})(V) = \operatorname{colim}_{V \supset \beta^{\prime}(U)}\operatorname{colim}_{V' \supset \alpha(V)} \mathscr{F}(\alpha^{-1}(V^\prime)) = \operatorname{colim}_{V' \supset \beta(\alpha^{\prime}(U))}\mathscr{F}(\alpha^{-1}(V^\prime))$. The map $\beta^{\prime, -1}\alpha^{-1}\alpha_*\mathscr{F} \to \beta^{\prime,-1}\mathscr{F}$ is defined by the map of cones $\{\mathscr{F}(\alpha^{-1}(V^\prime)) \to \operatorname{colim}_{V \supset \beta^{\prime}(U)}\mathscr{F}(V) \}_{V' \supset \alpha(\beta^{\prime}(U))}$. It switches to $\alpha^{\prime,-1}\beta^{-1}\alpha_*\mathscr{F} \to \beta^{\prime,-1}\mathscr{F}$ just via the relation $\alpha(\beta^{\prime}(U)) = \beta(\alpha^{\prime}(U))$ and defined by $\{\mathscr{F}(\alpha^{-1}(V^\prime)) \to \operatorname{colim}_{V \supset \beta^{\prime}(U)}\mathscr{F}(V) \}_{V' \supset \beta(\alpha^{\prime}(U))}$, i.e., the map $\operatorname{colim}_{V' \supset \beta(\alpha^{\prime}(U))}\mathscr{F}(\alpha^{-1}(V^\prime)) \to \operatorname{colim}_{V \supset \beta^{\prime}(U)}\mathscr{F}(V)$ .Then it moves to $\beta^{-1}\alpha_*\mathscr{F} \to \alpha_{*}^\prime\beta^{\prime,-1}\mathscr{F}$ by replacing $U$ to $\alpha^{\prime,-1}(U)$ in the last colimit maps: $\operatorname{colim}_{V' \supset \beta(\alpha^{\prime}(\alpha^{\prime, -1}(U)))}\mathscr{F}(\alpha^{-1}(V^\prime)) \to \operatorname{colim}_{V \supset \beta^{\prime}(\alpha^{\prime,-1}(U))}\mathscr{F}(V)$ , and then compose $\operatorname{colim}_{V \supset \alpha^{-1}(\beta(U))} \mathscr{F}(V) \to \operatorname{colim}_{V \supset \alpha^{\prime}(\alpha^{\prime,-1}(U))} \operatorname{colim}_{V' \supset \alpha^{-1}(\beta(V))}\mathscr{F}(V') = \operatorname{colim}_{V' \supset \alpha^{-1}(\beta(\alpha^{\prime}(\alpha^{\prime,-1}(U)))} \mathscr{F}(V') = \operatorname{colim}_{V' \supset \beta(\alpha^{\prime}(\alpha^{\prime, -1}(U)))}\mathscr{F}(\alpha^{-1}(V^\prime)).$ Hence it’s still the map $\operatorname{colim}_{V \supset \alpha^{-1}(\beta(U))} \mathscr{F}(V) \to \operatorname{colim}_{V^\prime\supset \beta^{\prime}(\alpha^{\prime, -1}(U))} \mathscr{F}(V^\prime)$.
Back to the case of category of sheaves, first one can prove that the following diagram commute:
$$
\begin{CD}
PSh_W(\beta^{\prime, -1}_{pre}\mathscr{F},\beta^{\prime, -1}_{pre}\mathscr{F}) @>{(\beta^{\prime,-1}_{pre},\beta^{\prime}_*)}>{\sim}> PSh_X(\mathscr{F},\beta^\prime_*\beta^{\prime, -1}_{pre}\mathscr{F}) \\
@V{(-)^{sh}}VV @VV{\beta^{\prime}_*sh_*}V \\
Sh_W(\beta^{\prime, -1}\mathscr{F},\beta^{\prime, -1}\mathscr{F}) @>{(\beta^{\prime,-1},\beta^{\prime}_*)}>{\sim}> Sh_X(\mathscr{F},\beta^\prime_*\beta^{\prime, -1}\mathscr{F})
\end{CD}
$$
Since adjoint pair is natural in both two variables, given the map $sh:\beta^{\prime, -1}_{pre}\mathscr{F} \to \beta^{\prime, -1}\mathscr{F}$(cf. exercise 2.4.I), treating it as a morphism in the category of presheaves, one have
$$
\begin{CD}
PSh_W(\beta^{\prime, -1}_{pre}\mathscr{F},\beta^{\prime, -1}_{pre}\mathscr{F}) @>{(\beta^{\prime,-1}_{pre},\beta^{\prime}_*)}>{\sim}> PSh_X(\mathscr{F},\beta^\prime_*\beta^{\prime, -1}_{pre}\mathscr{F}) \\
@V{sh_*}VV @VV{\beta^{\prime}_*sh_*}V \\
PSh_W(\beta^{\prime, -1}_{pre}\mathscr{F},\beta^{\prime, -1}\mathscr{F}) @>{(\beta^{\prime,-1}_{pre},\beta^{\prime}_*)}>{\sim}> Sh_X(\mathscr{F},\beta^\prime_*\beta^{\prime, -1}\mathscr{F})
\end{CD}
$$
Then $PSh_W(\beta^{\prime, -1}_{pre}\mathscr{F},\beta^{\prime, -1}\mathscr{F}) \cong Sh_W(\beta^{\prime, -1}\mathscr{F},\beta^{\prime, -1}\mathscr{F})$ by the sheafification and forgetful adjoint pair and $Sh_W(\beta^{\prime, -1}\mathscr{F},\beta^{\prime, -1}\mathscr{F}) \cong Sh_X(\mathscr{F},\beta^\prime_*\beta^{\prime, -1}\mathscr{F})$ by the $(\beta^{\prime,-1},\beta^{\prime}_*)$ adjoint pair. I believe that they composing to the isomorphism $PSh_W(\beta^{\prime, -1}_{pre}\mathscr{F},\beta^{\prime, -1}\mathscr{F}) \cong Sh_X(\mathscr{F},\beta^\prime_*\beta^{\prime, -1}\mathscr{F})$ has to be used directly(hence there should be some condition on this about the three adjoint pairs in the general setting here). Using this composition, one get the commutative diagram in the begining of the paragraph.
Then the commutative diagram induced by applying $\alpha_*$ is easier to see. A third commutative diagram using the adjointness of $(\beta_*, \beta^{-1})$ is similar to the argument of the above diagram.
The dual definition gives similar results. Composing all these diagrams transforms the result to the category of sheaves.