Solution
= Solution
Let $Z=(X,Y)$ be an independent test example and write $Z_i=(X_i,Y_i)$. Exchangeability of $Z$ and $Z_i$ gives
$$
\mathbb E\,\ell(H_D,Z)
=\frac1n\sum_{i=1}^n
\mathbb E\,\ell(H_{D_i(Z)},Z_i).
$$
The datasets $D_i(Z)$ and $D$ differ in one coordinate, so stability gives
$$
\mathbb E\,\ell(H_{D_i(Z)},Z_i)
\leq\mathbb E\,\ell(H_D,Z_i)+\beta.
$$
Averaging over $i$ and subtracting the empirical loss proves
$$
\boxed{\mathbb EF(D)\leq\beta}.
$$