Q:

How to show the transition from equation $(4)$ to equation $(5)$?

How to show the transition between $(4)$ to $(5)$ in here?

A:

Equation $4$ is just an application of the multivariable chain rule, while equation $5$ uses the definition of $\dfrac{d}{dz}$.
Don't think of equation $5$ as having been derived from equation $4$. Instead, think of the right hand sides of equations $4$ and $5$ as two different expressions for the same quantity, namely $\dfrac{df}{dz}$.

