12 Real numbers $x, y$ satisfy $1+\cos ^{2}(2 x+3 y-1)=\frac{x^{2}+y^{2}+2(x+1)(1-y)}{x-y+1}$, then the minimum value of $x y$ is ( ).
(A) $\frac{1}{5}$
(B) $\frac{1}{25}$
(C) 1
(D) 5
12) Since
$$
1 \leqslant 1+\cos ^{2}(2 x+3 y-1) \leqslant 2,
$$

and
$$
\frac{x^{2}+y^{2}+2(x+1)(1-y)}{x-y+1}=\frac{1}{x-y+1}+x-y+1 \geqslant 2,
$$

therefore
$$
\left\{\begin{array}{l}
x-y+1=1, \\
2 x+3 y-1=k \pi,
\end{array}\right.
$$

which means
$$
x=y=\frac{k \pi+1}{5},
$$

where $k \in \mathbf{Z}$. Therefore, the minimum value of $x y$ is $\left(\frac{1}{5}\right)^{2}=\frac{1}{25}$. Hence, the answer is B.