If the function y = 2sinx + acosx range [- 3,3], then what is a equal to?

If the function y = 2sinx + acosx range [- 3,3], then what is a equal to?

A=3
9=2^2+a^2
A = - + root 5