$$ \tan^{-1}x+\tan^{-1}y=\tan^{-1}\frac{x+y}{1-xy} \text{, }xy<1\\ \tan^{-1}x-\tan^{-1}y=\tan^{-1}\frac{x-y}{1+xy} \text{, }xy>-1 $$
But, How do I reach the conditions $xy<1$ for the first expression and $xy>-1$ for the second from the domain and range of the functions, provided we are only considering the principal value branch ?
My Attempt $$ \tan^{-1}:\mathbb{R}\to \Big(\frac{-\pi}{2},\frac{\pi}{2}\Big) $$ $$ \text{Taking, }\alpha=\tan^{-1}x, \quad\beta=\tan^{-1}y\implies x=\tan\alpha,\quad y=\tan\beta\\ \tan(\alpha+\beta)=\frac{\tan\alpha+\tan\beta}{1-\tan\alpha\tan\beta}=\frac{x+y}{1-xy}\\ \text{We have, }-\pi<\tan^{-1}x+\tan^{-1}y=\alpha+\beta<\pi $$ If $\tfrac{-\pi}{2}<\alpha+\beta<\tfrac{\pi}{2}$ we have, $$ \alpha+\beta=\tan^{-1}\bigg(\frac{\tan\alpha+\tan\beta}{1-\tan\alpha\tan\beta}\bigg)\implies \tan^{-1}x+\tan^{-1}y=\tan^{-1}\frac{x+y}{1-xy} $$
For the first expression, $xy\neq{1}$ as the denominator can not be equal to zero.
$$ \frac{-\pi}{2}<\tan^{-1}\frac{x+y}{1-xy}<\frac{\pi}{2}\text{ and }-\pi<\tan^{-1}x+\tan^{-1}y<\pi\\\implies\frac{-\pi}{2}<\tan^{-1}x+\tan^{-1}y=\tan^{-1}\frac{x+y}{1-xy}<\frac{\pi}{2} $$ I really dont see any clue which leads to the condition $xy<1$. I checked a similar question asked Inverse trigonometric function identity doubt, but it does not seem to clear how to get to the given conditions from the above proof.
Note: I am not looking for proving the statement is correct. I'd like to see how to reach the given conditions from the domain and range of the functions involved.