[proofplan]
Choose an oriented cobordism $W$ from $M_0$ to $M_1$ and compare the tangent bundle of $W$ along the boundary with the tangent bundles of the boundary components. Naturality and [stable invariance of Pontryagin classes](/theorems/9782) identify the restriction of any Pontryagin monomial of $TW$ with the corresponding Pontryagin monomial of $TM_i$. The restricted top-degree class pairs to zero with the oriented boundary because it is the boundary restriction of a closed form on $W$. Expanding the boundary orientation gives the desired equality of the two Pontryagin numbers.
[/proofplan]
[step:Fix a Pontryagin monomial of total degree $4k$]
Let $(a_1,\dots,a_k)$ be a finite sequence of nonnegative integers satisfying
\begin{align*}
\sum_{j=1}^{k} j a_j = k.
\end{align*}
Define the Pontryagin monomial assignment $P$ on smooth real vector bundles $E\to X$ by
\begin{align*}
P(E):=p_1(E)^{a_1}\cdots p_k(E)^{a_k}\in H^{4k}(X;\mathbb R),
\end{align*}
where $p_j(E)\in H^{4j}(X;\mathbb R)$ is the $j$-th Pontryagin class of $E$. When $k=0$, this product is interpreted as the empty product $P(E)=1\in H^0(X;\mathbb R)$. Since $\dim M_i=4k$, the Pontryagin number associated to $P$ on $M_i$ is
\begin{align*}
\left\langle P(TM_i),[M_i]\right\rangle.
\end{align*}
Thus it is enough to prove
\begin{align*}
\left\langle P(TM_0),[M_0]\right\rangle
=
\left\langle P(TM_1),[M_1]\right\rangle.
\end{align*}
[/step]
[step:Identify the restricted tangent bundle of the cobordism with a stabilized boundary tangent bundle]
Let $W$ be a compact oriented smooth $(4k+1)$-manifold whose boundary is orientation-preservingly identified with $(-M_0)\sqcup M_1$. Let
\begin{align*}
\iota_i:M_i\to W
\end{align*}
denote the smooth embedding of the boundary component corresponding to $M_i$, for $i\in\{0,1\}$. Along $\iota_i(M_i)$, the tangent bundle of $W$ splits as
\begin{align*}
\iota_i^*TW\cong TM_i\oplus \varepsilon_{M_i}^1,
\end{align*}
where $\varepsilon_{M_i}^1:=M_i\times\mathbb R$ is the product real line bundle determined by a nowhere-zero normal vector field along the boundary component.
By naturality of Pontryagin classes, as in [citetheorem:9814], and stable invariance of Pontryagin classes, as in [citetheorem:9782], we have for every $j\ge 0$
\begin{align*}
\iota_i^*p_j(TW)=p_j(\iota_i^*TW)=p_j(TM_i\oplus \varepsilon_{M_i}^1)=p_j(TM_i).
\end{align*}
Multiplicativity of pullback in cohomology therefore gives
\begin{align*}
\iota_i^*P(TW)=P(TM_i)
\end{align*}
for $i\in\{0,1\}$.
[guided]
The point of this step is that the boundary of $W$ is not just a submanifold: its tangent bundle is one dimension smaller than $TW$. The missing direction is the normal line. For each boundary component, let
\begin{align*}
\iota_i:M_i\to W
\end{align*}
be the inclusion map determined by the chosen boundary identification. Since $M_i$ is a boundary component of $W$, a collar neighbourhood provides a nowhere-zero normal vector field along $\iota_i(M_i)$. This gives an isomorphism of real vector bundles over $M_i$:
\begin{align*}
\iota_i^*TW\cong TM_i\oplus \varepsilon_{M_i}^1,
\end{align*}
where $\varepsilon_{M_i}^1:=M_i\times\mathbb R$ denotes the product real line bundle.
Now we compare Pontryagin classes. Naturality of Pontryagin classes, [citetheorem:9814], applies to the smooth map $\iota_i:M_i\to W$ and the real vector bundle $TW\to W$, so it gives
\begin{align*}
\iota_i^*p_j(TW)=p_j(\iota_i^*TW).
\end{align*}
Stable invariance of Pontryagin classes, [citetheorem:9782], applies to the vector bundle $TM_i\to M_i$ after adding the product line bundle $\varepsilon_{M_i}^1$, so it gives
\begin{align*}
p_j(TM_i\oplus \varepsilon_{M_i}^1)=p_j(TM_i).
\end{align*}
Combining these two identities with the splitting $\iota_i^*TW\cong TM_i\oplus \varepsilon_{M_i}^1$ yields
\begin{align*}
\iota_i^*p_j(TW)=p_j(TM_i).
\end{align*}
Because pullback is a ring homomorphism on cohomology, it preserves products and powers. Therefore the whole monomial restricts correctly:
\begin{align*}
\iota_i^*P(TW)=P(TM_i).
\end{align*}
This is exactly where stable invariance is needed: ordinary restriction gives $p_j(\iota_i^*TW)$, and stable invariance is what removes the extra normal line.
[/guided]
[/step]
[step:Pair the restricted class with the oriented boundary]
Let
\begin{align*}
\jmath:\partial W\to W
\end{align*}
be the boundary inclusion. Choose a closed smooth differential form $\omega\in\Omega^{4k}(W)$ representing the de Rham class $P(TW)\in H^{4k}(W;\mathbb R)$. Since $d\omega=0$, [Stokes' theorem](/theorems/1530) on the compact oriented manifold with boundary $W$, interpreted through the standard de Rham comparison between differential forms and cohomological pairings with orientation fundamental classes, gives
\begin{align*}
\left\langle \jmath^*P(TW),[\partial W]\right\rangle=0.
\end{align*}
[guided]
Let
\begin{align*}
\jmath:\partial W\to W
\end{align*}
denote the smooth inclusion of the boundary. The class $P(TW)\in H^{4k}(W;\mathbb R)$ is a de Rham cohomology class, so choose a smooth differential form $\omega\in\Omega^{4k}(W)$ representing it. Since representatives of de Rham cohomology classes are closed, $d\omega=0$.
We now apply Stokes' theorem to the compact oriented smooth manifold with boundary $W$ and the smooth differential form $\omega\in\Omega^{4k}(W)$. The form $\omega$ has degree one less than $\dim W=4k+1$, and $d\omega=0$. Under the standard de Rham comparison, Stokes' theorem therefore says that the cohomology class represented by $\jmath^*\omega$ has zero pairing with the boundary fundamental class:
\begin{align*}
\left\langle \jmath^*P(TW),[\partial W]\right\rangle=0.
\end{align*}
This is the cohomological reason the Pontryagin monomial cannot distinguish two boundary components of one oriented cobordism: the class on the boundary is the restriction of a class from the cobordism.
[/guided]
[/step]
[step:Expand the boundary orientation into the two Pontryagin numbers]
The oriented boundary identification is
\begin{align*}
\partial W\cong (-M_0)\sqcup M_1.
\end{align*}
Hence the boundary fundamental class satisfies
\begin{align*}
[\partial W]=[M_1]-[M_0]
\end{align*}
under this decomposition, where $[M_0]$ and $[M_1]$ denote the given orientation fundamental classes of the two closed manifolds. Using the restriction identity from the previous boundary-component computation, we obtain
\begin{align*}
0=\left\langle \jmath^*P(TW),[\partial W]\right\rangle.
\end{align*}
Expanding over the disjoint union gives
\begin{align*}
0=\left\langle P(TM_1),[M_1]\right\rangle-\left\langle P(TM_0),[M_0]\right\rangle.
\end{align*}
Therefore
\begin{align*}
\left\langle P(TM_0),[M_0]\right\rangle
=
\left\langle P(TM_1),[M_1]\right\rangle.
\end{align*}
Since the monomial $P=p_1^{a_1}\cdots p_k^{a_k}$ was arbitrary among all degree $4k$ Pontryagin monomials, every Pontryagin number of $M_0$ equals the corresponding Pontryagin number of $M_1$.
[guided]
The boundary orientation is the sign bookkeeping in the argument. The chosen oriented cobordism identifies the oriented boundary with
\begin{align*}
\partial W\cong (-M_0)\sqcup M_1.
\end{align*}
Thus the fundamental class of the boundary decomposes as
\begin{align*}
[\partial W]=[M_1]-[M_0],
\end{align*}
where $[M_i]$ is the fundamental class determined by the given orientation on $M_i$.
From the previous step, the restricted class has zero pairing with this boundary fundamental class:
\begin{align*}
0=\left\langle \jmath^*P(TW),[\partial W]\right\rangle.
\end{align*}
The restriction computation on each boundary component identifies $\iota_i^*P(TW)$ with $P(TM_i)$. Therefore expanding the pairing over the oriented disjoint union gives
\begin{align*}
0=\left\langle P(TM_1),[M_1]\right\rangle-\left\langle P(TM_0),[M_0]\right\rangle.
\end{align*}
Rearranging yields
\begin{align*}
\left\langle P(TM_0),[M_0]\right\rangle=\left\langle P(TM_1),[M_1]\right\rangle.
\end{align*}
Since the sequence $(a_1,\dots,a_k)$ was arbitrary subject to $\sum_{j=1}^{k}j a_j=k$, this proves equality for every Pontryagin number of total degree $4k$.
[/guided]
[/step]