Hello

$\displaystyle \sin x\left(\frac{1}{\sin x}\cdot\frac{1}{\sin (2x)}+\frac{1}{\sin (2x)}\cdot\frac{1}{\sin (3x)}\right)=\frac{\cos(ax)}{\sin(ax)}+\frac{\cos( bx)}{\sin(bx)}$

Let's factor $\displaystyle \frac{1}{\sin(2x)}$ :

$\displaystyle \frac{\sin x}{\sin (2x)}

\left( \frac{1}{\sin x}+\frac{1}{\sin (3x)}\right)=\frac{\cos(ax) \sin(bx)+\sin(ax)\cos(bx)}{\sin(ax)\sin(bx)}$

Using $\displaystyle \sin[(a+b)x]=\cos(ax) \sin(bx)+\sin(ax)\cos(bx)$ :

$\displaystyle \frac{\sin x}{\sin (2x)}\cdot\frac{\sin (3x)+\sin x}{\sin(3x)\sin x}=\frac{\sin[(a+b)x]}{\sin(ax)\sin(bx)}$

Notice that $\displaystyle \begin{aligned}\sin (3x)+\sin x

&=\sin (2x+x)+\sin(2x-x)\\

&=\sin(2x)\cos x+\sin x \cos(2x)+\sin(2x)\cos x-\sin x\cos(2x)\\

&=2\sin(2x)\cos x

\end{aligned}$

thus the equality becomes

$\displaystyle \frac{2\sin (2x)\cos x}{\sin(3x)\sin(2x)}=\frac{\sin[(a+b)x]}{\sin(ax)\sin(bx)}$

which can be written

$\displaystyle \sin(ax)\times 2\sin(bx)\cos x=\sin(3x)\times\sin[(a+b)x]$

From this last equality one can see more easily that the solution given by TKHunny is correct... but finding the values of $\displaystyle a$ and $\displaystyle b$ without knowing them seems to be a bit more difficult.