Consider the given equation
tan−1(x−1x−2)+tan−1(x+1x+2)=π4
We know that
tan−1x+tan−1y=tan−1(x+y1−xy)
Therefore,
tan−1⎛⎜ ⎜ ⎜ ⎜⎝(x−1x−2)+(x+1x+2)1−(x−1x−2)(x+1x+2)⎞⎟ ⎟ ⎟ ⎟⎠=π4
tan−1⎛⎜ ⎜ ⎜ ⎜⎝(x−1)(x+2)+(x+1)(x−2)x2−41−x2−1x2−4⎞⎟ ⎟ ⎟ ⎟⎠=π4
tan−1⎛⎜ ⎜ ⎜ ⎜⎝x2+2x−x−2+x2−2x+x−2x2−4x2−4−x2+1x2−4⎞⎟ ⎟ ⎟ ⎟⎠=π4
tan−1(2x2−4−4+1)=π4
(2x2−4−3)=tanπ4
2x2−4=−3
2x2=1
x2=12
x=±1√2
Hence, the value of x is ±1√2.