
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 vectors $\overrightarrow{a}=(-2,-1,3)$, $\overrightarrow{b}=(-1,1,2)$, $\overrightarrow{c}=(x,2,2)$.  
$(1)$ When $|\overrightarrow{c}|=2\sqrt{2}$, if the vector $k\overrightarrow{a}+\overrightarrow{b}$ is perpendicular to $\overrightarrow{c}$, find the values of the real numbers $x$ and $k$.  
$(2)$ If the vector $\overrightarrow{c}$ lies in the plane formed by vectors $\overrightarrow{a}$ and $\overrightarrow{b}$, find the value of the real number $x$.

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