The correct option is D −1√2
Let A=tan−1x−1x−2 and B=tan−1x+1x+2
Then, tanA=x−1x−2 and tanB=x+1x+2
Now, A+B=π4
⇒tan(A+B)=tanπ4
⇒tanA+tanB1−tanAtanB=1
⇒tanA+tanB=1−tanAtanB
⇒x−1x−2+x+1x+2=1−x−1x−2×x+1x+2
⇒(x−1)(x+2)+(x+1)(x−2)=(x−2)(x+2)−(x−1)(x+1)
⇒x2+x−2+x2−x−2=x2−4−x2+1
⇒2x2=1
⇒x=±1√2