Prove (1+cos x/1+cot x) = tan x

So when I did this the proof I got was -tanx and i can't really see where i went wrong:

1+tanx/1+cotx =tanx

(1-cotx/1-cotx) (1+tanx/1+cotx)

1+tanx-cotx-cotxtanx/ 1-cot^2x

(1+(sinx/cosx) - (cosx/sinx) - (cosx/sinx)(sinx/cosx)) / 1-(cos^2x/sin^2x)

((sin^2xcosx- sinxcos^2x/sinxcosx)/( (sin^2x/sin^2x) - (cos^2x/sin^2x)))

((sinxcosx(sinx-cosx)/sinxcosx)) / sin^2x-cos^2x)

sinx-cosx/(sin^2x-cos^2x/sin^2x)

sinx -cosx /1 times sin^2x/(sin^2x-cos^2x)

sin^2x/(sinx-cosx)

- sinx/cosx

-tanx

Hopefully this makes sense ....