Can you express x as a function of z? Then focus on the chain rule...

Just in case a picture helps with the logic of this...

... where

... the chain rule. Straight continuous lines differentiate downwards (integrate up) with respect to x, and the straight dashed line similarly but with respect to the dashed balloon expression (the inner function of the composite which is subject to the chain rule).

Spoiler:

________________________________________

Don't integrate - balloontegrate!

http://www.ballooncalculus.org/examples/reference.html

http://www.ballooncalculus.org/asy/doc.html