Given $x, y$ are acute angles such that $\sin y= 3\cos(x+y)\sin x$. Find the maximum value of $\tan y$. Given $x, y$ are acute angles such that $\sin y= 3\cos(x+y)\sin x$. Find the maximum value of $\tan y$.
Attempt at a solution:
$$(\sin y = 3(\cos x \cos y - \sin x \sin y) \sin x) \frac{1}{\cos y}$$
$$\tan y = (3 \cos x - 3 \sin x \tan y) \sin x$$
$$\tan y + 3 \sin^2 x + \tan y = 3 \sin x \cos x$$
$$\tan y = \frac{3 \sin x \cos x}{1 + 3 \sin^2 x}$$
I have also tried substituting $0$, $30$, $45$, $60$, $90$ to the values of $x$.

Hint:
Since
$$
\begin{align}
\sin(y)
&=3\cos(x+y)\sin(x)\\
&=3\cos(x)\cos(y)\sin(x)-3\sin(x)\sin(y)\sin(x)
\end{align}
$$
we get
$$
\begin{align}
\tan(y)
&=\frac{3\sin(x)\cos(x)}{1+3\sin^2(x)}\\
&=\frac{3\tan(x)}{\sec^2(x)+3\tan^2(x)}\\[3pt]
&=\frac{3\tan(x)}{1+4\tan^2(x)}
\end{align}
$$
Then note that $1+4\tan^2(x)=4\tan(x)+(2\tan(x)-1)^2$.
