How does $3\cos x + 4\sin x$ become $5\cos(x - \arctan\frac{4}{3})$? I'm not sure how any rule is being applied to manipulate the $4\sin x$
None of the double angle/compound angle formulas have the trig functions in this layout
 A: This is a standard trick.  You factor out the square root of the sums of the squares of the coefficients:   $\sqrt{3^2+4^2} = 5$.
Then you have
$$5\left(\frac{3}{5}\cos x + \frac{4}{5}\sin x\right).$$
Then if $\alpha$ is the angle in a right triangle with sides $3$ and $4$ and hypotenuse $5$, you have
$$5\left(\cos\alpha\cos x + \sin \alpha\sin x\right) = 5\cos (x-\alpha).$$
A: First observe that $\sqrt{3^2 + 4^2} = 5,$ and so $\sqrt{\left( \frac 3 5 \right)^2 + \left( \frac 4 5 \right)^2} = 1.$ So there is some angle $\varphi$ for which $\cos\varphi=\frac 3 5$ and $\sin\varphi=\frac 4 5.$ Since the sine and cosine of that angle are both positive, it is in the first quadrant. Its tangent is its sine divide by its cosine, so that is $4/3.$ Hence $\varphi = \arctan \frac 43.$
So
\begin{align}
& 3\cos x + 4\sin x = 5\left( \tfrac 3 5 \cos x + \tfrac 4 5 \sin x \right) \\[8pt]
= {} & 5\left( \cos\varphi \cos x + \sin\varphi \sin x \right) \\[8pt]
= {} & 5\cos(x-\varphi) = 5\cos(x - \arctan \tfrac 4 3).
\end{align}
A: Here's a general guide and explanation for problems of your type:
If we have an expression, $A\sin{x}+B\cos{x}$, let us assume it can be written in the form $R\sin(x+\alpha)$. Now to see if we can find values for $R$ and $\alpha$ in terms of $A$ and $B$. Using the compund angle formulae, also known as the addition formulae:
$$R\sin(x+\alpha)=R\sin{x}\cos{\alpha}+R\sin\alpha\cos x=A\sin{x}+B\cos{x}$$
So we have
$$R\cos\alpha=A,R\sin\alpha=B$$
So dividing the second equality by the first:
$$\tan\alpha=\frac{B}{A}$$
meaning we can find $\alpha$ in terms of $A$ and $B$, as we wanted. Now, to find $R$:
Squaring the $2$ equalities above we have
$$R^2\cos^2\alpha+R^2\sin^2\alpha=R^2(\cos^2\alpha+\sin^2\alpha)=R^2=A^2+B^2\implies R=\sqrt{A^2+B^2}$$
So, to finish off by recapping what we have learnt:
$$\tan\alpha=\frac{B}{A},~R=\sqrt{A^2+B^2}$$
The same methodolgy applies to writing $A\sin{x}+B\cos{x}$ as $R\cos(x+\beta)$.
Try applying that to your question and obtaining similiar general results for $R\cos(x+\beta)$. I hope that was helpful :)
