[guided]Fix a bounded continuous function $f:X\to\mathbb R$. The reason for introducing $Q_1f$ is that its definition builds the Kantorovich constraint into the notation. Define the map $Q_1f:X\to\mathbb R$ by
\begin{align*}
(Q_1 f)(x)=\inf_{y\in X}\left\{f(y)+\frac{d(x,y)^2}{2}\right\}.
\end{align*}
This function is bounded below because $f$ is bounded and $d(x,y)^2/2\ge 0$:
\begin{align*}
(Q_1f)(x)\ge \inf_{z\in X} f(z).
\end{align*}
It is bounded above because the point $y=x$ is allowed in the infimum:
\begin{align*}
(Q_1f)(x)\le f(x)+\frac{d(x,x)^2}{2}=f(x).
\end{align*}
Hence $Q_1f$ is bounded. It is also Borel measurable: for each fixed $y\in X$, the map $x\mapsto f(y)+d(x,y)^2/2$ is continuous, and the pointwise infimum of continuous functions is upper semicontinuous, hence Borel measurable.
Now take arbitrary points $x,y\in X$. Since $(Q_1f)(x)$ is the infimum over all choices of the second variable, the particular choice $y$ gives
\begin{align*}
(Q_1f)(x)\le f(y)+\frac{d(x,y)^2}{2}.
\end{align*}
Subtracting $f(y)$ from both sides gives
\begin{align*}
(Q_1f)(x)-f(y)\le \frac{d(x,y)^2}{2}.
\end{align*}
This is exactly the Kantorovich admissibility condition for the pair $\varphi=Q_1f$ and $\psi=-f$.
Now let $\nu\in\mathcal P(X)$ and choose an arbitrary coupling $\pi\in\Pi(\nu,\mu)$. Because $Q_1f$ and $f$ are bounded Borel functions, we may integrate the pointwise inequality against $\pi$:
\begin{align*}
\int_{X\times X}\left((Q_1f)(x)-f(y)\right)\,d\pi(x,y)\le\int_{X\times X}\frac{d(x,y)^2}{2}\,d\pi(x,y).
\end{align*}
The left-hand side separates by the marginal conditions defining $\Pi(\nu,\mu)$:
\begin{align*}
\int_{X\times X}(Q_1f)(x)\,d\pi(x,y)=\int_X (Q_1f)(x)\,d\nu(x)
\end{align*}
and
\begin{align*}
\int_{X\times X}f(y)\,d\pi(x,y)=\int_X f(y)\,d\mu(y).
\end{align*}
Therefore
\begin{align*}
\int_X (Q_1f)(x)\,d\nu(x)-\int_X f(y)\,d\mu(y)\le\int_{X\times X}\frac{d(x,y)^2}{2}\,d\pi(x,y).
\end{align*}
Since $\pi$ was arbitrary, taking the infimum over $\Pi(\nu,\mu)$ gives
\begin{align*}
\int_X (Q_1f)(x)\,d\nu(x)-\int_X f(y)\,d\mu(y)\le\mathcal T_{d^2/2}(\nu,\mu).
\end{align*}
The orientation matters: $Q_1f$ is integrated against the first marginal $\nu$, while $f$ is integrated against the second marginal $\mu$.[/guided]