12. Let $n \in \mathbf{N}_{+}$, and $(\sqrt{2}+\sqrt{3})^{2 n-1}=a_{n} \sqrt{2}+b_{n} \sqrt{3}$. If $a_{n+1}=p a_{n}+q b_{n}$, then $p+q=$ $\qquad$ , $2 a_{n}^{2}-3 b_{n}^{2}$ is $\qquad$
12. $11,-1$.
$$
a_{n+1} \sqrt{2}+b_{n+1} \sqrt{3}=(\sqrt{2}+\sqrt{3})^{2 n+1}=(\sqrt{2}+\sqrt{3})^{2 n-1}(5+2 \sqrt{6})=\left(a_{n} \cdot \sqrt{2}+b_{n} \cdot \sqrt{3}\right)(5+2 \sqrt{6}) \text {, }
$$

So we have $a_{n+1}=5 a_{n}+6 b_{n}, b_{n+1}=4 a_{n}+5 b_{n}$, hence $p+q=11$.
$$
2 a_{n+1}^{2}-3 b_{n+1}^{2}=2\left(5 a_{n}+6 b_{n}\right)^{2}-3\left(4 a_{n}+5 b_{n}\right)^{2}=2 a_{n}^{2}-3 b_{n}^{2}=\cdots=2 a_{1}^{2}-3 b_{1}^{2}=-1 .
$$