Recall that #sec x = 1/(cos x)#. We will begin by rearranging the factors so that #sec x# and #cos x# are beside each other and then proceed with substituting the definition for #sec x#.
#sec x tan x cos x# #tan x sec x cos x# #tan x (1/(cos x)) cos x# #tan x ((cos x)/(cos x))# #tan x (1)# #tan x#