We have,
tan−1(x−1x−2)+tan−1(x+1x+2)=π4
We know that
tan−1x+tan−1y=tan−1x+y1−xy
Therefore,
tan−1(x−1x−2)+(x+1x+2)1−(x−1x−2)(x+1x+2)=π4
(x−1)(x+2)+(x+1)(x−2)(x+2)(x−2)(x−2)(x+2)−(x−1)(x+1)(x+2)(x−2)=tanπ4
x2+2x−x−2+x2−2x+x−2x2−4−x2+1=1
2x2−4−3=1
2x2−4=−3
2x2=1
x2=12
x=±1√2
Hence, this is the value.