Multiply through by cosx: cos^2x+sinxcosx+sinx-1=0. This is now a quadratic in cosx:
(cosx+1)(cosx+sinx-1)=0
Therefore, cosx+sinx=1 or cosx=-1, and these can be solved for specific values of x only: x=0, (pi), (pi)/2, etc. this means that the original equation is not an identity but an equation with certain solutions.
However, cosx+sinxtanx=(cos^2x+sin^2x)/cosx=1/cosx=secx. So perhaps the question was wrongly presented?