how does sin(t)sec(t) = tanx ?

Because secx = 1/cosx and tanx = sinx/cosx. Make the substitutions and see for yourself.

Use the same independent variable on both sides. You have t on one side and x on the other.