$\tan^{-1}(x+1)+\cot^{-1}(\frac{1}{x-1})=\tan^{-1}(\frac{8}{31})$
One thing to clear is that the range of arccotangent is $(0,\pi)$. I am so sad because I can't use Wolfram to cross check my answers. I tried to solve the problem and got two values of $x=\frac{1}{4},-8$ But I had used the tangent function on both sides. So there were high chances that extraneous roots have been generated. So I tried to put $x=\frac{1}{4}$ and $-8$. But in both cases I came to the end value $\pi+\tan^{-1}(\frac{8}{31})$ which is not equal to $\tan^{-1}(\frac{8}{31})$
Moreover to my surprise both the answer are given as the correct answers in the answer key. I don't trust it though.
Please guide me where I am going wrong.
The issue is the arccotangent's range. Or it would have been way easier.
Edit 1: My solution:

