12. Given the ellipse $E: \frac{x^{2}}{9}+\frac{y^{2}}{4}=1, A(0,2), P(-3,2)$, a line $l$ passing through point $P$ intersects the ellipse $E$ at two distinct points $B, C$. The lines $A B, A C$ intersect the $x$-axis at points $M, N$.
(1) If $|M N|=6$, find the equation of the line $l$;
(2) Find the equation of the locus of the circumcenter of $\triangle P M N$.


(1) As shown in the figure, let $l: y=k(x+3)+2$,

Solving the system $\left\{\begin{array}{l}y=k x+3 k+2, \\ 4 x^{2}+9 y^{2}=36\end{array}\right.$
$$
\begin{aligned}
\Rightarrow & \left(9 k^{2}+4\right) x^{2}+18 k(3 k+2) x \\
& +9(3 k+2)^{2}-36=0 .
\end{aligned}
$$

Assume $B\left(x_{1}, y_{1}\right), C\left(x_{2}, y_{2}\right)$,
then $A B: y=\frac{y_{1}-2}{x_{1}} x+2$, setting $y=0 \Rightarrow x_{M}=-\frac{2 x_{1}}{y_{1}-2}$, similarly, $x_{N}=-\frac{2 x_{2}}{y_{2}-2}$.
Thus, $|M N|=\left|\frac{2 x_{2}}{y_{2}-2}-\frac{2 x_{1}}{y_{1}-2}\right|=2\left|\frac{x_{2}\left(y_{1}-2\right)-x_{1}\left(y_{2}-2\right)}{\left(y_{1}-2\right)\left(y_{2}-2\right)}\right|$
$$
\begin{array}{l}
=2\left|\frac{k x_{2}\left(x_{1}+3\right)-k x_{1}\left(x_{2}+3\right)}{k^{2}\left(x_{1}+3\right)\left(x_{2}+3\right)}\right|=6\left|\frac{x_{2}-x_{1}}{k\left[x_{1} x_{2}+3\left(x_{1}+x_{2}\right)+9\right]}\right| \\
=6\left|\frac{\sqrt{[18 k(3 k+2)]^{2}-4\left(9 k^{2}+4\right)\left[9(3 k+2)^{2}-36\right]}}{k\left[9(3 k+2)^{2}-36-3 \cdot 18 k(3 k+2)+9\left(9 k^{2}+4\right)\right]}\right|=6\left|\frac{2 \sqrt{-3 k}}{3 k}\right|=6 \Rightarrow k=-\frac{4}{3} .
\end{array}
$$

Therefore, the equation of the line $l$ is $y=-\frac{4}{3} x-2$.
$$
\begin{array}{l}
\text { (2) Since } x_{M}+x_{N}=-\left(\frac{2 x_{1}}{y_{1}-2}+\frac{2 x_{2}}{y_{2}-2}\right)=-2 \cdot \frac{x_{1}\left(y_{2}-2\right)+x_{2}\left(y_{1}-2\right)}{\left(y_{1}-2\right)\left(y_{2}-2\right)} \\
=-2 \cdot \frac{k x_{1}\left(x_{2}+3\right)+k x_{2}\left(x_{1}+3\right)}{k^{2}\left(x_{1}+3\right)\left(x_{2}+3\right)}=-2 \cdot \frac{2 x_{1} x_{2}+3\left(x_{1}+x_{2}\right)}{k\left[x_{1} x_{2}+3\left(x_{1}+x_{2}\right)+9\right]} \\
=-2 \cdot \frac{2\left[9(3 k+2)^{2}-36\right]-3 \cdot 18 k(3 k+2)}{k\left[9(3 k+2)^{2}-36-3 \cdot 18 k(3 k+2)+9\left(9 k^{2}+4\right)\right]} \\
=-4 \cdot \frac{9 k^{2}+12 k-3 k(3 k+2)}{k\left[9 k^{2}+12 k-6 k(3 k+2)+\left(9 k^{2}+4\right)\right]}=-6,
\end{array}
$$

Thus, $\triangle P M N$ is an isosceles triangle, with its circumcenter on the line $x=-3$. When $B, C$ coincide at the left vertex of the ellipse $E$, the circumcenter's y-coordinate tends to 1; when $B, C$ coincide at the top vertex of the ellipse $E$, the circumcenter's y-coordinate tends to negative infinity.
Therefore, the trajectory equation of the circumcenter of $\triangle P M N$ is $x=-3(y<1)$.