Answer:
∠K = 80°
∠M = 100°
Explanation:
Angles along a line total 180°. So, your equation for ∠K is ...
60° +40° +∠K = 180°
∠K = 180° -100° = 80°
Similarly, ...
∠M = 180° -∠K = 100°
_____
Additional comment
Together, the 60° and 40° angles make a 100° angle that is vertical to (and congruent with) ∠M. Recognizing that, you know ∠M = 100°. ∠P is a vertical angle with ∠K, so will have the same measure, 80°.