Latter. Easy to check: e.g. take y = x^2, t = x^2.
d/dx (dy/dx) = 2.
d/dt(dt/dx dy/dx) = d/dt (2x.2x) = d/dt(4t) = 4.
dt/dx d/dt (dy/dx) = 2x d/dt (2x) = 2x d/dt 2 \sqrt{t} = 2x / sqrt(t) = 2x / x = 2.
I sometimes resort to checks like this when I'm rusty about how bits of A-level calculus work...