Verified Answer :

\(a\sin(bx+c)=a\sin(bx)\cos(c)+a\cos(bx)\sin(c)=\cos(3x)+2\sin(3x)\)

Clearly, you have \(b=3\). In the second term of the middle expression, you need to have \(a\sin(c)=1\), and in the first term, \(a\cos(c)=2\).

\(a\sin(c)=1\implies a=\dfrac1{\sin(c)}\implies a\cos(c)=\dfrac{\cos(c)}{\sin(c)}=\cot(c)=2\)

which means \(c=\mathrm{arccot}(2)\). Then,

\(a\sin(\mathrm{arccot}(2))=\dfrac a{\sqrt5}=1\implies a=\sqrt5\)

So,

\(y=\cos(3x)+2\sin(3x)=\sqrt5\sin(3x+\mathrm{arccot}(2))\)