\begin{align*}&\cot^{-1}(\tan 2x)+\cot^{-1} (-\tan 3x) \\ &=\cot^{-1} (\cot(\tfrac{\pi}{2}-2x))+\cot^{-1} (\cot(\tfrac{\pi}{2}+3x))\\ &=\tfrac{\pi}{2}-2x+\tfrac{\pi}{2}+3x\\ &=\pi -x.\end{align*}
Where did I go wrong in the process? The range of the inverse functions as well as the calculations seem fine to me. But the answer from book I am using, however, doesn't match with it. The book instead says the answer is $x$. But that's only possible when we take $\cot^{-1} (-\tan 3x)=-\cot^{-1}(\tan 3x)$. I am not sure if that's true since I know $\cot^{-1} (-x)=\pi-\cot^{-1} x$. But this fact also however doesn't give the answer $x$ and neither $\pi-x$. So I am confused.
Gary's comment explains what goes wrong. In fact, if we are talking about the entire domain, you and your book are both wrong. Evaluating at $0$, $$ \cot^{-1}(\tan (2\cdot 0))+\cot^{-1}(\tan (3\cdot 0))=\cot^{-1}(0)+\cot^{-1}(0)=\pi. $$ Evaluating at $\pi$ $$ \cot^{-1}(\tan (2\pi))+\cot^{-1}(\tan (3\pi))=\cot^{-1}(0)+\cot^{-1}(0)=\pi. $$ The first calculation shows that $x$ fails, while the second shows that $\pi+x$ fails.