My math teacher said me if while solving trigonometric equations involving inverse trigonometric functions you are not able to get enough information about the inputs and if you have to solve for specific ranges of input or if nothing is given then directly use the below formula without thinking of anything and just check for extraneous solutions $$\tan^{-1}(x)+\tan^{-1}(y)=\tan^{-1}\left(\frac{x+y}{1-xy}\right)$$ Though the above formula is only valid for $xy$ being less than 1 And guess what! I saw the textbook doing the same in many illustration in the above picture I have shared 2 of them in illustration 7.62 look at the 3rd line and also in illustration 7.63 look at 3rd line In both places they have directly used the above formula without mentioning anything also my teacher didn't go in much details
What I want to ask that is it even correct to do so? or am I missing something? Won't it cause us to miss some solutions? or is it some standard convention or something? Because the book I'm using is quite famous in India and many people use it , it's name is 'Cengage Trigonometry for JEE Advance '

You don't need to use the addition formula for $\tan^{-1}$. Instead, use the addition formula for $\tan$ itself.
For the first problem:
\begin{align*} \sin^{-1}x&=\tan^{-1}2x-\tan^{-1}x\\ \implies \tan(\sin^{-1}x)&=\tan\left(\tan^{-1}2x-\tan^{-1}x\right)\\ \implies \frac{x}{\sqrt{1-x^2}}&=\frac{2x-x}{1-2x\cdot (-x)}\\ &\vdots \end{align*}
Note that we require $|x|\le 1$ for the problem to be meaningful.
For the second problem:
\begin{align*} \tan^{-1}6x&=\tan^{-1}\left(\frac{3x^2+1}{x}\right)-\tan^{-1}\left(\frac{1-3x^2}{x}\right)\\ \implies 6x&=\tan\left(\tan^{-1}\left(\frac{3x^2+1}{x}\right)-\tan^{-1}\left(\frac{1-3x^2}{x}\right)\right)\\ \implies 6x&=\frac{\frac{3x^2+1}{x}-\frac{1-3x^2}{x}}{1-\frac{3x^2+1}{x}\cdot\left(-\frac{1-3x^2}{x}\right)}\\ &\vdots \end{align*}
In these workings, you only need: \begin{align*} \tan(A+B)&\equiv\frac{\tan(A)+\tan(B)}{1-\tan(A)\tan(B)}\\ \tan(\tan^{-1}(x))&\equiv x\\ \tan(\sin^{-1}x)&\equiv\frac{x}{\sqrt{1-x^2}} \end{align*}
This method should give all solutions therefore, but it may also give some non-solutions too as the direction of implication does not hold in reverse as the tangent function is not injective. For this reason, solutions should be checked in the original equation as a last step.