9. Given a point $P(3,1)$ and two lines $l_{1}: x+2 y+3=0, l_{2}: x+2 y-7=0$, find the equation of the circle passing through $P$ and tangent to $l_{1}, l_{2}$.
The center $O$ of the required circle lies on the line $x+2 y-2=0$, and the radius $R=\sqrt{5}$. Let $O(2-2 t, t)$, then $|O P|^{2}=(2 t+1)^{2}+(t-1)^{2}=5 t^{2}+2 t+2=5 \Rightarrow 5 t^{2}+2 t-3=0 \Rightarrow t_{1}=\frac{3}{5}, t_{2}=-1$. Therefore, the equations of the circle are $\left(x-\frac{4}{5}\right)^{2}+\left(y-\frac{3}{5}\right)^{2}=5$ or $(x-4)^{2}+(y+1)^{2}=5$.