
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 $f(x)=x^{2}-1$, $g(x)=\begin{cases} x-1, & x > 0, \\ 2-x, & x < 0. \end{cases}$

$(1)$ Calculate $f(g(2))$ and $g(f(2))$;

$(2)$ Find the expressions for $f(g(x))$ and $g(f(x))$.

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