Got the first part by factoring out cosx just like taking an "a" out of ab + a which gives a (b+1) This is where the 1 comes from also. Try distributing the cosx and see how it works !
(cosx)(tan^2x) + cosx = cosx(tan^2x+1) = (cosx)(sec^2x) = cosx/cos^2x = 1/cosx = secx
We know that tanx = sinx/ cosx and secx =1/cosx. And the trigonometric identity, (sinx)^2+(cosx)^2 = 1
cosx(tanx)^2 +cosx = cosx(sinx/cosx)^2+cosx = (sinx)^2/cosx+cosx = (sinx)^2 / cosx + cos x*cosx/cosx = [(sinx)^2+(cosx)^2]/cosx = 1/cosx =secx which is the term on RHS.
how did you get the first part...
What does the 1 come from? where did the + cos go to....