[tex]a\sin(bx+c)=a\sin(bx)\cos(c)+a\cos(bx)\sin(c)=\cos(3x)+2\sin(3x)[/tex]
Clearly, you have [tex]b=3[/tex]. In the second term of the middle expression, you need to have [tex]a\sin(c)=1[/tex], and in the first term, [tex]a\cos(c)=2[/tex].
[tex]a\sin(c)=1\implies a=\dfrac1{\sin(c)}\implies a\cos(c)=\dfrac{\cos(c)}{\sin(c)}=\cot(c)=2[/tex]
which means [tex]c=\mathrm{arccot}(2)[/tex]. Then,
[tex]a\sin(\mathrm{arccot}(2))=\dfrac a{\sqrt5}=1\implies a=\sqrt5[/tex]
So,
[tex]y=\cos(3x)+2\sin(3x)=\sqrt5\sin(3x+\mathrm{arccot}(2))[/tex]