Let $X, Y, Z$ be compact topological manifolds $f: Y \to X, g: Z \to X$ be embeddings of submanifolds meeting transversely and let $W = Y \times\_X Z$:
$$
\begin{array}{ccc}
 Y & \to^f & X \\
 \uparrow^G & & \uparrow^g\\
 W & \to^F & Z \\
\end{array}
$$


My question is: How does one show that the two morphisms $F\_! \circ G^\*$ and $g^\*
\circ f\_!$ from $H^\*(Y, \mathbb Q)$ to $H^\*(Z, \mathbb Q)$ coincide?


Here $F\_!, f\_!$ are Gysin morphisms; let us not concern ourselves with degree shift for brevity.


Using the natural morphisms ${\mathbb Q}\_Y \to G\_\*{\mathbb Q}\_W$ and ${\mathbb Q}\_W \to RF^!{\mathbb Q}\_Z$ and adjunction the first morphism can be represented as the composition of the following morphisms
$$
RHom\_Y({\mathbb Q}\_Y, {\mathbb Q}\_Y) \to RHom\_Y({\mathbb Q}\_Y, G\_\* {\mathbb Q}\_W) \cong RHom\_W(G^\*{\mathbb Q}\_Y,{\mathbb Q}\_W) \cong RHom\_W({\mathbb Q}\_W,{\mathbb Q}\_W) \to RHom\_W({\mathbb Q}\_W, RF^!{\mathbb Q}\_Z) \cong RHom\_Z(RF\_! {\mathbb Q}\_W, {\mathbb Q}\_Z) \cong RHom\_Z({\mathbb Q}\_Z, {\mathbb Q}\_Z) 
$$
and using the natural morphisms ${\mathbb Q}\_Y \to Rf^!{\mathbb Q}\_X$ and ${\mathbb Q}\_X \to g\_\*{\mathbb Q}\_Z$ the second morphism can be represented as the composition of
$$
RHom\_Y({\mathbb Q}\_Y, {\mathbb Q}\_Y) \to RHom\_Y({\mathbb Q}\_Y, Rf^!{\mathbb Q}\_X) \cong RHom\_X(Rf\_!{\mathbb Q}\_Y, {\mathbb Q}\_X) \cong RHom\_X({\mathbb Q}\_X, {\mathbb Q}\_X) \to RHom\_X({\mathbb Q}\_X, g\_\*{\mathbb Q}\_Z) \cong RHom\_Z(g^\*{\mathbb Q}\_X, {\mathbb Q}\_Z) \cong RHom\_Z({\mathbb Q}\_Z, {\mathbb Q}\_Z)
$$


The base change theorem (Iversen, "Cohomology of sheaves" VII.2.6)
gives an isomorphism of the corresponding functors, i.e. $RF\_! \circ
G^\* \mathcal F \cong g^\* \circ Rf\_! \mathcal F$ functorially in the object $\mathcal F$ in the derived category. I am not sure how one aplies this statement about functors to deduce the statement about morphisms on cohomology.



commutativity of restriction and Gysin morphisms in a cartesian square
One way to see this is to use the definition of the Gysin map via Thom isomorphisms. Then (at least in this simplest case where everything is an embedding) the statement reduces to the fact that Thom isomorphisms are natural for pullbacks of bundles.


To explain what I mean, let me give one possible definition of the Gysin map $f\_!:H^\*(Y)\to H^{\*+k}(X)$ associated to the embedding $f:Y\hookrightarrow X$ of codimension $k$. Let $V\subseteq X$ be a normal tubular neighbourhood of $Y$ in $X$ endowed with a Riemannian metric. Then we can identify $f\_!$ with the composition
$$
H^\*(Y)\cong H^{\*+k}(D(V),S(V))\cong \tilde{H}^{\*+k}(Th(V))\to \tilde{H}^{\*+k}(X\_+)\cong H^{\*+k}(X),
$$
where $D(V)$, $S(V)$ and $Th(V)=D(V)/S(V)$ are the disc bundle, sphere bundle and Thom space of $V$ respectively, the first isomorphism is the Thom isomorphism for $V$, and the only non-isomorphism is induced by the Pontryagin-Thom collapse map from the one-point compactification of $X$ to the Thom space of $V$. (Of all the viewpoints on Gysin maps espoused at [How should one think about pushforward in cohomology?](https://mathoverflow.net/q/64744/8103), this is closest to Tilman's. By the way, Algori's answer there seems to be related to your sheaf-theoretic approach.)


Now since the normal bundle of $F: W\hookrightarrow Z$ is the pullback of the normal bundle of $f$ under $G:W\to Y$, by choosing compatible Riemannian metrics we get a commuting square  

$\require{AMScd}$
\begin{CD}
 H^\*(Y) @>>> H^{\*+k}(D(V),S(V))\\
 @V G^\* V V @VV\bar{G}^\*V\\
 H^\*(W) @>>> H^{\*+k}(D(U),S(U)) 
\end{CD}
for some normal tubular neighbourhood $U$ of $W$ in $Z$. Then it's a hop, skip and a jump to extend this diagram to get the full statement.


All of this generalises to proper maps oriented with respect to whatever cohomology theory you're using.


**Edit (to give more details):** To finish the proof we have to check that the following diagram commutes, where the compositions along the rows are the Gysin maps $f\_!$ and $F\_!$:


\begin{CD}
 H^\*(Y) @>>> \tilde{H}^{\*+k}(Th(V)) @>>>\tilde{H}^{\*+k}(X\_+)\\
 @V G^\* V V @VVTh(\bar{G})^\*V @VVg\_+^\* V\\
 H^\*(W) @>>> \tilde{H}^{\*+k}(Th(U)) @>>> \tilde{H}^{\*+k}(Z\_+)
\end{CD}


The left hand square commutes by naturality of the Thom Isomorphism (this is a well-known fact which should be stated in Algebraic Topology texts - the statement at least is in tom Dieck's recent book). I claim that we can choose $U$ so that the map $\overline{G}:U\to V$ is the restriction $g|\_U$ on the nose, which makes evident the commutativity of the diagram of pointed spaces


\begin{CD}
 Th(U) @<<< Z\_+ \\
 @V Th(\overline{G})VV @VVg\_+ V\\
 Th(V) @<<< X\_+ 
\end{CD}


involving the Pontryagin-Thom collapse maps.


