we have the point k(-2,4)
see the attached figure to better understand the problem
the point k lies in the II quadrant
![\cos (\theta)=-\cos (x)](https://img.qammunity.org/2023/formulas/mathematics/college/xsazw4trbh1pfg5sj9lk2rjvevzbtzsoq4.png)
because angle theta and angle x are supplementary angles
cos(x)=x/c
where
c^2=2^2+4^2
c^2=20
c=2√5
so
cos(x)=2/2√5
cos(x)=1/√5
therefore
cos(theta)=-1/√5
simplify
cos(theta)=-√5/5