Let $u(x)=xq(x)-t(x)$. Incentive compatibility dictates that $xq(x)-t(x)\geq xq(z)-t(z)$, when $x$ is the observed private value. Using a little algebraic manipulation, it can be shown that,

$xq(x)-t(x)+zq(z)\geq xq(z)-t(z)+zq(z)$, or

$u(x)+zq(z)\geq u(z)+xq(z)$, or

$u(x)\geq u(z) +(x-z)q(z)$. Let this be $(1)$.

Similarly, $zq(z)-t(z)\geq zq(x)-t(x)$, when $z$ is the observed private value. Thus, from here as well, we have $u(z)\geq u(x) +(z-x)q(x)$. Let this expression be $(2)$.

From $(1)$, we have $\cfrac{u(x)-u(z)}{x-z} \geq q(z)$. Similarly, from $(2)$, we have $\cfrac{u(x)-u(z)}{x-z} \leq q(x)$. Now, we have the expression, 
\begin{align*}
q(z) \leq \cfrac{u(x)-u(z)}{x-z} \leq q(x)  \\ -(3)
\end{align*}

Let $x=z+\delta$. We now have from $(3)$,
\begin{align*}
q(z) \leq \cfrac{u(z+\delta)-u(z)}{z + \delta -z} \leq q(z+\delta)  \\ -(4)
\end{align*}

As $\delta \rightarrow 0$, it will follow from $(4)$ that $u'(x)=q(x)$.