Solution (source code)

= Solution

For any coupling $\pi$ of $X\sim P$ and $Y\sim Q$ and every $A\subseteq\Omega$,
$$
P(A)-Q(A)
=\mathbb P_\pi(X\in A,Y\notin A)
-\mathbb P_\pi(X\notin A,Y\in A).
$$
Its absolute value is at most $\mathbb P_\pi(X\ne Y)$. Taking the supremum over $A$ and then the infimum over couplings proves
$$
d_{\mathrm{TV}}(P,Q)
\leq\inf_{\pi\in\Pi(P,Q)}\mathbb P_\pi(X\ne Y).
$$