$$ \tan^{-1}x+\tan^{-1}y=\begin{cases} \pi+\tan^{-1}\frac{x+y}{1-xy} &\mbox{if } xy>1 \quad\&\quad x,y>0\\ -\pi+\tan^{-1}\frac{x+y}{1-xy} & \mbox{if } xy>1\quad\&\quad x,y<0\end{cases} $$
The above expression can be proved, pls check. asnswer of "lab bhattacharjee" in the post A question about the arctangent addition formula.
What if I prove the conditions as follows
Attempt:
Taking $$ \alpha=\tan^{-1}x\implies x=\tan\alpha\quad\text{ ,where }\frac{-\pi}{2}<\alpha<\frac{\pi}{2}\\ \beta=\tan^{-1}y\implies y=\tan\beta\quad\text{ ,where }\frac{-\pi}{2}<\beta<\frac{\pi}{2}\\ \implies-\pi<\alpha+\beta<\pi $$ Now consider the case where $\frac{\pi}{2}<\alpha+\beta<{\pi}$ (or) -$\pi<\alpha+\beta<\frac{-\pi}{2}$ $$ \frac{-\pi}{2}<\alpha,\beta<\frac{\pi}{2}\\ \implies\color{red}{\cos(\alpha+\beta)<0},\quad\text{ as }\alpha+\beta\in[\tfrac{\pi}{2},\pi]\cup[-\pi,\tfrac{-\pi}{2}]\\ \implies\cos\alpha.\cos\beta-\sin\alpha.\sin\beta<0\\ \implies \cos\alpha.\cos\beta-\cos\alpha\tan\alpha.\cos\beta\tan\beta<0 \\\implies \cos\alpha\cos\beta\big[1-xy\big]>0\implies1-xy<0\implies \boxed{xy>1} $$ For case 1:
If $x,y<0$ then $\tan^{-1}x,\tan^{-1}y<0$
$$ \implies \tan^{-1}x+\tan^{-1}y<0 $$ which is not the case as $\frac{\pi}{2}<\tan^{-1}x+\tan^{-1}y<{\pi}$. $$ \implies \boxed{x,y>0} $$
For case 2:
If $x,y>0$ then $\tan^{-1}x,\tan^{-1}y>0$
$$ \implies \tan^{-1}x+\tan^{-1}y>0 $$ which is not the case as ${-\pi}<\tan^{-1}x+\tan^{-1}y<\frac{-\pi}{2}$. $$ \implies \boxed{x,y<0} $$
Is there anything wrong in taking $\cos(\alpha+\beta)<0$ in the case where $\frac{\pi}{2}<\alpha+\beta<{\pi}$ (or) $-\pi<\alpha+\beta<\frac{-\pi}{2}\\$ and proving as above ?