Here's another way of solving this problem.
We know that tantheta = sintheta/costheta and sectheta = 1/costheta. So,
sinx/cosx + 1/cosx= 2
(sinx + 1)/cosx= 2
sinx + 1 = 2cosx
Square both sides.
(sinx + 1)^2 = (2cosx)^2
sin^2x+ 2sinx + 1 = 4cos^2x
We use the identity sin^2theta + cos^2theta = 1-> cos^2theta = 1 - sin^2theta.
sin^2x + 2sinx + 1 = 4(1 - sin^2x)
sin^2x+ 2sinx + 1 = 4 - 4sin^2x
5sin^2x + 2sinx - 3 = 0
We let t = sinx.
5t^2 + 2t - 3 = 0
5t^2 + 5t - 3t - 3 = 0
5t(t + 1) - 3(t + 1) = 0
(5t - 3)(t + 1)= 0
t = 3/5 and -1
sinx = 3/5 and sinx = -1
x = pi - arcsin(3/5) + 2pin, arcsin(3/5) + 2pin, (3pi)/2 + 2pin
However, pi - arcsin(3/5) + 2pin and (3pi)/2 + 2pin extraneous. pi - arcsin(3/5) since tangent is negative in quadrant II and so is cosine. (3pi)/2 is extraneous since it is an asymptote in the secant function and in the tangent function.
Therefore, the only actual solution is x = arcsin(3/5) + 2pin, where n is an integer.
Hopefully this helps!