<s>[INST] Given that $3\sin x + 2\sin y = 4$. Find the maximum value of $3\cos x + 2\cos y$. 
Given that $3\sin x + 2\sin y = 4$. Find the maximum value of $3\cos x + 2\cos y$.

I wonder if calculus can be used to solve this problem? If not how to solve this? I am thinking about $(3\cos x + 2\cos y)^2=9\cos^2x+12\cos x\cos y + 4\cos^2y$ and work in this way but I don't quite see how.
 [/INST] Hint:
$\begin{align}(3\cos x + 2\cos y)^2=&9\cos^2x+12\cos x\cos y + 4\cos^2y\\=&13+12\cos x\cos y +12\sin x\sin y -(9\sin^2x+4\sin^2y+12\sin x\sin y)\\=& 13+12\cos(x-y)-(3\sin x+2\sin y)^2\\=&-3+12\cos(x-y)\end{align}$
</s>