2. Find all pairs of positive integers $(x, n)$, satisfying the equation
$$
3 \times 2^{x}+4=n^{2} \text {. }
$$
2. When $x=1$, there is no solution.

When $x=2$, $(x, n)=(2,4)$.
Assume $x \geqslant 3$.
Since the left side of the original equation is even, $n$ must be even, let $n=2k$.
$$
\begin{array}{l}
\text { Then } 3 \times 2^{x}+4=n^{2} \\
\Leftrightarrow 3 \times 2^{x-2}=k^{2}-1 .
\end{array}
$$

Thus, $k$ is odd.
Therefore, the equation can be written as
$$
3 \times 2^{x-2}=(k-1)(k+1) \text {. }
$$
(1) $k+1=3 \times 2^{a}, k-1=2^{b}$, where, $a 、 b \geqslant$ $1, a+b=x-2$.
Then, $3 \times 2^{a}-2^{b}=2$.
If $a 、 b \geqslant 2$, the left side of equation (1) is divisible by 4, while the right side is not, so $a=1, b=2, k=5$.
Thus, $(x, n)=(5,10)$.
(2) $k+1=2^{s}, k-1=2^{t}$, where, $s 、 t \geqslant 1$, $s+t=x-2$.
Similarly to (1), we find $(x, n)=(6,14)$.
$$
\text { Hence }(x, n)=(5,10),(6,14) \text {. }
$$