You are asked to write $\var{a}\cos(x) + \var{b}\sin(x)$ in the form $R\cos(x-\alpha)$.
Using the cosine addition formula
$R\cos(x-\alpha) = R(\cos(x)\cos(\alpha) + \sin(x)\sin(\alpha))$
which can be rearranged to
$R\cos(x-\alpha) = R\cos(\alpha)\cos(x) + R\sin(\alpha)\sin(x)$
Now we can compare the two expressions
$\var{a}\cos(x) + \var{b}\sin(x) \equiv R\cos(\alpha)\cos(x) + R\sin(\alpha)\sin(x)$
Which gives $R\cos(\alpha) = \var{a}$ and $R\sin(\alpha) = \var{b}$.
Squaring each equation and adding gives
$R^2\cos^2(\alpha) + R^2\sin^2(\alpha) = \var{a}^2 + \var{b}^2$
which can be simpliefied to
$R^2(\cos^2(\alpha) + \sin^2(\alpha)) = \var{a}^2 + \var{b}^2$
and so to (remembering trigonometric identities)
$R^2 = \var{a}^2 + \var{b}^2$
which finally gives $R = \var{precround(R,2)}$.
We can also divide the equations:
$\frac{R\sin(\alpha)}{R\cos(\alpha)} = \frac{\var{b}}{\var{a}}$
Which simplifies to
$\tan(\alpha) = \simplify[all,fractionNumbers]{{b}/{a}}$
Which means $\alpha = \var{precround(alpha,2)}$
So, finally, we have:
$\var{a}\cos(x) + \var{b}\sin(x) \equiv \var{precround(R,2)}\cos(x-\var{precround(alpha,2)})$