9. (14 points) Given the ellipse $C: \frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b \geqslant 0)$, its eccentricity is $\frac{4}{5}$, and one of its directrix equations is $x=\frac{25}{4}$.
(1) Find the equation of the ellipse; (2) Let point $A$ have coordinates (6, $0), B$ be a moving point on the ellipse $C$, and construct an isosceles right $\triangle A B P$ with $A$ as the right-angle vertex (the letters $A, B, P$ are in clockwise order). Find the equation of the trajectory of point $P$.
9. Solution: (1) From the given $e=\frac{c}{a}=\frac{4}{5} \quad x=\frac{a^{2}}{c}=\frac{25}{4}$, thus $c=4 \quad a^{2}=25 \quad \therefore b^{2}=9$
Therefore, the equation of the ellipse is $\frac{x^{2}}{25}+\frac{y^{2}}{9}=1$.
(2) Let $P(x, y), B\left(x_{0}, y_{0}\right)$, then by the problem:
$$
\begin{array}{l}
Z_{A P}=Z_{A B} \cdot(-i) \\
\text { i.e., }(x-6)+y i=\left[\left(x_{0}-6\right)+y_{0}^{i}\right] \cdot(-i)=y_{0}- \\
\left(x_{0}-6\right) i \\
\therefore\left\{\begin{array} { l } 
{ x - 6 = y _ { 0 } } \\
{ y = 6 - x _ { 0 } }
\end{array} \Rightarrow \left\{\begin{array}{l}
x_{0}=6-y \\
y_{0}=x-6
\end{array}\right.\right. \\
\quad \text { Hence } \frac{(y-6)^{2}}{25}+\frac{(x-6)^{2}}{9}=1 .
\end{array}
$$