<s>[INST] What is $\tan \alpha$, if $(a+2)\sin\alpha +(2a - 1)\cos\alpha =2a + 1$? I tried the following:
$$\begin{aligned}a\sin\alpha +2\sin\alpha + 2a\cos\alpha - \cos\alpha &= 2a+1\\
a(\sin\alpha +2\cos\alpha)+(2\sin\alpha-\cos\alpha)&=2a+1\end{aligned}$$
Therefore,
$$\sin\alpha +2 \cos\alpha=2$$
$$2\sin\alpha - \cos\alpha=1$$
From these two equations, we get
$$\sin\alpha=\frac{4}{5},\cos\alpha=\frac{3}{5}$$
Therefore,
$$\tan\alpha = \frac{\sin\alpha} {\cos\alpha} = \frac{4} {3}$$
Is this a correct method to solve the question? Since $a$ is a constant, it does not seem necessary to me that its coefficients on the two sides of the equation be equal. Should I find $\sin\alpha$ and $\cos\alpha$ using some other method? Are there specific cases where this method of equating the coefficients will break?
 [/INST] Hint:
Use  Weierstrass substitution  to form a quadratic equation $$\tan\dfrac\alpha2=t$$
$$(a+2)\cdot\dfrac{2t}{1+t^2}+(2a-1)\cdot\dfrac{1-t^2}{1+t^2}=2a+1$$
$$\iff-t^2(2a+1+2a-1)+2t(a+2) +2a-1-(2a+1)=0$$
$$\iff2at^2-t(a+2)+1=0$$
Now use $\tan2A=\dfrac{2\tan A}{1-\tan^2A}$
</s>