Remember that sec x = 1/cos x
tan x + 1/cosx = cosx/1-sinx.
sinx/cos x +1/cosx = cosx/1-sinx
(1+sinx)/cosx = cosx/1-sinx
(1+sinx)(1-sinx) = cos^2(x)
1-sin^2(x) = cos^2(x)
sin^2(x)+cos^2(x) = 1 which is true.
I hope that this is the answer that you were looking for and it has helped you.