It looks like you have
tan²(x) / (1 - tan(x)) + cot(x) / (1 - tan(x)) = cot(x) + tan(x) + 1
but this is not an identity.
Take for instance x = 3π/4. Then
tan(3π/4) = -1
cot(3π/4) = -1
so that
tan²(x) / (1 - tan(x)) + cot(x) / (1 - tan(x)) = 0
while
cot(x) + tan(x) + 1 = -1
and of course 0 ≠ -1.