
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 $A=\{x|x^2+px-2=0\}$ and $B=\{x|x^2+qx+r=0\}$, and $A\cup B=\{-2, 1, 5\}$, $A\cap B=\{-2\}$, find the values of $p$, $q$, and $r$.

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