There should be a chapter in your textbook about solving equation of the form:
a sin(x) + b cos(x) = c.
We can just divide both sides by (k2 + 1)1/2, to get:
\frac{1}{2\sqrt{k ^ 2 + 1}} = \frac{k}{\sqrt{k ^ 2 + 1}} \cos(\theta) - \frac{1}{\sqrt{k ^ 2 + 1}} \sin(\theta)
Now, let angle \alpha, be an angle such that:
\cos \alpha = \frac{k}{\sqrt{k ^ 2 + 1}}, and \sin \alpha = \frac{1}{\sqrt{k ^ 2 + 1}}, such angle does exist, because:
\sin ^ 2 \alpha + \cos ^ 2 \alpha = \frac{k ^ 2}{k ^ 2 + 1} + \frac{1}{k ^ 2 + 1} = 1
Now, your equation will become:
\frac{1}{2\sqrt{k ^ 2 + 1}} = \cos(\alpha + \theta), which is easy to solve. Right? :)