Interaction With Composition. Given a diagram
in $\mathsf{Sets}$, we have isomorphisms of sets
\begin{align*} X\times ^{f\circ \phi ,g\circ \psi }_{K}Y & \cong \webleft (X\times ^{\phi ,q_{1}}_{A}\webleft (A\times ^{f,g}_{K}B\webright )\webright )\times ^{p_{2},p_{1}}_{A\times ^{f,g}_{K}B}\webleft (\webleft (A\times ^{f,g}_{K}B\webright )\times ^{q_{2},\psi }_{B}Y\webright )\\ & \cong X\times ^{\phi ,p}_{A}\webleft (\webleft (A\times ^{f,g}_{K}B\webright )\times ^{q_{2},\psi }_{B}Y\webright )\\ & \cong \webleft (X\times ^{\phi ,q_{1}}_{A}\webleft (A\times ^{f,g}_{K}B\webright )\webright )\times ^{q,\psi }_{B}Y \end{align*}
where
\[ \begin{aligned} q_{1} & = \text{pr}^{A\times ^{f,g}_{K}B}_{1},\\ p_{1} & = \text{pr}^{\webleft (A\times ^{f,g}_{K}B\webright )\times ^{q_{2},\psi }_{Y}}_{1},\\ p & = q_{1}\circ \text{pr}^{\webleft (A\times ^{f,g}_{K}B\webright )\times ^{q_{2},\psi }_{B}Y}_{1}, \end{aligned} \qquad \begin{aligned} q_{2} & = \text{pr}^{A\times ^{f,g}_{K}B}_{2},\\ p_{2} & = \text{pr}^{X\times ^{\phi ,q_{1}}_{A\times ^{f,g}_{K}B}\webleft (A\times ^{f,g}_{K}B\webright )}_{2},\\ q & = q_{2}\circ \text{pr}^{X\times ^{\phi ,q_{1}}_{A}\webleft (A\times ^{f,g}_{K}B\webright )}_{2}, \end{aligned} \]
and where these pullbacks are built as in the following diagrams: