For the question, $\tan (2x) \tan x=1$, I divided it by $\tan x$, and got the solution as $\frac{(2n+1)\pi}{6}$.
$\tan 2x= \cot x= \tan\left(\frac{\pi}{2}-x\right)$. So, $2x=n\pi+ \frac{\pi}{2}-x$. So, $3x= \frac{(2n+1)\pi}{2}$
But the book solved using the formula of $\tan (2x)$, and got the solution as $\frac{(6n \pm 1)\pi}{6}$. I can see that my solution has odd multiples of $\pi/2$, which should be discarded, but I thought of it only after checking the solution. Also, in a way, it suggests that we can't solve these questions in different ways because that way we might get extra solutions. So, how to ensure which method to follow?
I have used a different approach to solve this and tried to keep everything generalized without any predefined assumptions.
$$\tan (2\theta)\tan (\theta)=1 $$
$$ \Longrightarrow \frac{2\tan^2(\theta)}{1-\tan^2(\theta)} -1 = 0$$
$$ \Longrightarrow \frac{3\tan^2(\theta) -1}{1-\tan^2(\theta)} = 0$$
Solving for $3\tan^2(\theta) -1 = 0 $ we get $\theta = n\pi \pm \frac{\pi}{6}$.
However if $\frac{1}{1-\tan^2(\theta)} = 0 $ then $\tan(\theta)$ must be undefined which surely won't satisfy our original solution.
Thus to conclude the solution is $\theta = n\pi \pm \frac{\pi}{6}$.