
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
Given three points in space $P(-2,0,2)$, $M(-1,1,2)$, $N(-3,0,4)$, let $\overrightarrow{a}=\overrightarrow{PM}$, $\overrightarrow{b}=\overrightarrow{PN}$.  
$(1)$ If $k\overrightarrow{a}+\overrightarrow{b}$ is perpendicular to $k\overrightarrow{a}-2\overrightarrow{b}$, find the value of $k$.  
$(2)$ Find the distance from point $N$ to the line $PM$.

Present the answer in LaTex format: \boxed{Your answer}
user