It's a combination of the fact that $\frac{dt}{dx} = \frac{1}{\frac{dx}{dt}}$ and the chain rule, namely that $\frac{dy}{dx} = \frac{dy}{dt}\,\frac{dt}{dx}$.