
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
Let the quadratic function \( f(x) \) take its maximum value of 5 when \( x = a \), where \( a > 0 \). The quadratic function \( g(x) \) has a minimum value of -2, and \( g(a) = 25 \). Additionally, \( f(x) + g(x) = x^{2} + 16x + 13 \).

(1) Find the value of \( a \);

(2) Find the expression for \( g(x) \).

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