Rewrite the equations as
$$\cos x +\cos y+\cos z =k\cos(x+y+z) \\ \sin x+\sin y+\sin z=k\sin(x+y+z)$$
Multiply the second equation by $i$ (where $i=\sqrt{-1}$) , and add both the equations. Using Euler's formula, we are left with a single equation, that is,$$e^{ix}+e^{iy}+e^{iz}=ke^{i(x+y+z)}$$
Now, we have to find $\cos(x+y)+\cos(y+z)+\cos(z+x)=\Re\left(e^{i(x+y)}+e^{i(y+z)}+e^{i(z+x)}\right)$.
Now, we let $\alpha=e^{ix},\beta=e^{iy},\gamma=e^{iz}$, so that we have $\alpha+\beta+\gamma=k\alpha \beta\gamma $ and we need to find $\alpha\beta+\beta\gamma+\gamma\alpha$.
Dividing by $\alpha\beta\gamma$ in the last equation results in $(\alpha\beta)^{-1}+(\beta\gamma)^{-1}+(\gamma\alpha)^{-1}=k$.
But notice that $\Re(\alpha\beta)=\Re\left((\alpha\beta)^{-1}\right)$ since cosine is an even function and hence $\Re\left((\alpha\beta)^{-1}+(\beta\gamma)^{-1}+(\gamma\alpha)^{-1}\right)=\Re(\alpha\beta+\beta\gamma+\gamma\alpha)=k$.
If instead of real part, we take the imaginary parts, we get $\Im\left((\alpha\beta)^{-1}+(\beta\gamma)^{-1}+(\gamma\alpha)^{-1}\right)=-\Im\left(\alpha\beta+\beta\gamma+\gamma\alpha\right) \implies \sin(x+y)+\sin(y+z)+\sin(z+x)=0$.