True Error of a binary classifier
The first line should read
$$
\Pr_{x,y \sim D}[h(x) \neq y].
$$
(This is assuming that the classifier is deterministic.)

We can sample $x,y \sim D$ in two steps: first sample $x \sim D'$, and then sample $y \sim C_x$, where $C_x$ is a distribution depending on $x$.

The second line expresses the idea
$$
\operatorname*{\mathbb{E}}_{x \sim D'} \Pr_{y \sim C_x}[y \neq h(x)]
$$
in an elaborate way.

Both of these are the same, and equal to
$$
\operatorname*{\mathbb{E}}_{x \sim D'} \operatorname*{\mathbb{E}}_{y \sim C_x} 1_{h(x) \neq y}.
$$