Let t=tanx. The subtraction formula gives 1+tt−1=21, so 2t−2=1+t and t=3.
Using 1+cos2x=2cos2x, 1−cos2x=2sin2x, and sin2x=2sinxcosx, 1+sin2x−cos2x1+sin2x+cos2x=2sinx(sinx+cosx)2cosx(cosx+sinx)=cotx=31, where cancelling is allowed because tanx=3=−1 gives sinx+cosx=0. (Directly: sin2x=1+t22t=53 and cos2x=1+t21−t2=−54, so the value is 12/54/5=31. The distractor 3 is tanx itself.)