2. As shown in Figure 1, in the same plane, two congruent isosceles right triangles $\triangle A B C$ and $\triangle A F G$ are placed together, with $A$ as their common vertex, $\angle B A C=\angle A F G=90^{\circ}$. If $\triangle A B C$ is fixed and $\triangle A F G$ rotates around vertex $A$, the intersection points of $A G$ and $A F$ with side $B C$ are $D$ and $E$ (point $D$ does not coincide with point $B$, and point $E$ does not coincide with point $C$), then $B D^{2}-D E^{2}+E C^{2}$ is ( ).
(A) Positive
(B) 0
(C) Negative
(D) Cannot be determined
2. B.

As shown in Figure 3, rotate $\triangle A C E$ $90^{\circ}$ clockwise around vertex $A$ to get $\triangle A B H$, and connect $H D$.

In $\triangle E A D$ and $\triangle H A D$, we have
$$
\begin{aligned}
A E & =A H, \\
A D & =A D, \\
\angle H A D & =\angle E A H-\angle F A G \\
=45^{\circ} & =\angle E A D .
\end{aligned}
$$

Thus, $\triangle E A D \cong \triangle H A D$
$$
\Rightarrow D E=D H \text {. }
$$

Also, $\angle H B D=\angle A C E+\angle A B D=90^{\circ}$, therefore, $B D^{2}+H B^{2}=D H^{2}=D E^{2}$.