[guided]The point of this step is to use the special Hamiltonian sign pattern. The first $d$ components of $b$ are the $p$-derivatives of $H$, while the last $d$ components are the negatives of the $x$-derivatives of $H$. Thus, when we take the divergence, each $x_i$-derivative of a $p_i$-derivative is paired with the negative $p_i$-derivative of the corresponding $x_i$-derivative.
Formally, write $z = (x,p) \in \mathbb{R}^{2d}$ with $x = (x_1,\dots,x_d)$ and $p = (p_1,\dots,p_d)$. For each $i \in \{1,\dots,d\}$, the components of $b$ are
\begin{align*}
b_i(x,p) = \frac{\partial H}{\partial p_i}(x,p)
\end{align*}
and
\begin{align*}
b_{d+i}(x,p) = -\frac{\partial H}{\partial x_i}(x,p).
\end{align*}
Because $H$ is $C^2$, these component functions are $C^1$, so the divergence of $b$ is defined by differentiating the first $d$ components with respect to the $x$-variables and the last $d$ components with respect to the $p$-variables:
\begin{align*}
\operatorname{div} b(x,p) = \sum_{i=1}^d \frac{\partial}{\partial x_i}\left(\frac{\partial H}{\partial p_i}\right)(x,p) + \sum_{i=1}^d \frac{\partial}{\partial p_i}\left(-\frac{\partial H}{\partial x_i}\right)(x,p).
\end{align*}
Therefore
\begin{align*}
\operatorname{div} b(x,p) = \sum_{i=1}^d \frac{\partial^2 H}{\partial x_i \partial p_i}(x,p) - \sum_{i=1}^d \frac{\partial^2 H}{\partial p_i \partial x_i}(x,p).
\end{align*}
The hypothesis $H \in C^2(\mathbb{R}^{2d})$ is exactly what permits the use of equality of mixed partial derivatives for $C^2$ functions (citing a result not yet in the wiki: Equality of Mixed Partial Derivatives). Thus
\begin{align*}
\frac{\partial^2 H}{\partial x_i \partial p_i}(x,p) = \frac{\partial^2 H}{\partial p_i \partial x_i}(x,p)
\end{align*}
for every $i \in \{1,\dots,d\}$ and every $(x,p) \in \mathbb{R}^{2d}$. Each term in the first sum cancels the corresponding term in the second sum, so
\begin{align*}
\operatorname{div} b(x,p) = 0.
\end{align*}
This is the infinitesimal volume-preservation property of Hamiltonian vector fields.[/guided]