
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 the set $A=\{x|(x-2)(x-3a-1) < 0\}$, the domain of the function $y=\log \left(\frac{2a-x}{x-(a^2+1)}\right)$ is set $B$.
(1) If $a=2$, find the set $B$;
(2) If $A=B$, find the value of the real number $a$.

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