Writing $3\sin(x)+4\cos(x)$ in the form of $r \sin(x-a)$ I need to write $3\sin(x) + 4\cos(x)$ in the form of $r\sin(x-a)$.
Expanding $r\sin(x-a): r\sin(x)\cos(a)-r\sin(a)\cos(x)$
Comparing the two forms (The original equation and the expanded form): $3=r\cos(a)$ and $4=-r\sin(a)$.
Getting $r$:
$$\begin{align*}
3^2 + 4^2 &= r^2 \cos(a)^2 + r^2 \sin(a)^2\\
25 &= r^2 (\cos(a)^2 + \sin(a)^2)\\
25 &= r^2\\
r &= -5, 5
\end{align*}$$
Getting $a$:
$$\begin{align*}
\frac{-r\sin(a)}{ r\cos(a)} &= \frac{3}{4}\\
\tan(a) &= -\frac{3}{4}\\
a &= \arctan(-3/4)\\
a &= -36.87, 143.13\\
\end{align*}$$
The questions:-
There are two values for both $r$ and $a$, how should I choose the values to be in the final form?

The two values of $a$ differ by $180^{\circ}$. Since $\sin(y\pm 180^{\circ}) = -\sin(y)$, you want to pick $r$ and $a$ in such a way that $r\sin(x-a)$ has the same sign as $3\sin x+ 4\cos x$. 
When $x=0$, $3\sin x + 4\cos x=4$ is positive; so you want to pick $r$ and $a$ so that $r\sin(-a)$ is positive. This happens when $r=5$ and $a=-36.87^{\circ}$; or when $r=-5$ and $a=143.13$. The two choices work, the other two possibilities do not.
