#sec (x) = 1/cos (x)#

and,

#cot (x) = cos(x)/sin(x)#

expanding the given function;

#1/cos^2(x) * cos(x)/sin(x) - cos(x)/sin(x)#

#=> 1/(cos(x)*sin(x)) - cos(x)/sin(x)#

Multiplying the numerator and denominator of #cos(x)/sin(x)# by #cos(x)# we get the same denominators for both terms.

#=> 1/(cos(x)*sin(x)) - cos^2(x)/(cos(x) *sin(x))#

Then we can simplify further by taking common denominator;

#=> (1- cos^2(x))/(cos(x)*sin(x))#

we know, that #1- cos^2(x) = sin^2(x)#

Therefore, we have

#sin^2(x) / (cos(x)*sin(x))#

#=>sin^(cancel(2))(x)/ (cos(x)*cancel(sin(x)))#

#=> sin(x) / cos(x)#

#=> tan(x)#