
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 circle $C: x^{2}+y^{2}-4x-5=0$.
$(1)$ Draw a tangent line to circle $C$ passing through the point $(5,1)$, and find the equation of the tangent line.
$(2)$ If the midpoint of chord $AB$ on circle $C$ is $P(3,1)$, find the equation of the line on which $AB$ lies.

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