3. Given a geometric sequence $\left\{a_{n}\right\}$ with the sum of the first $n$ terms as $S_{n}$, and for any positive integer $n$ we have $S_{n+2}=4 S_{n}+3$. Then $a_{2}=$ ( ).
(A) 2
(B) 6
(C) 2 or 6
(D) 2 or -6
3. C.

Let the common ratio be $q$. Since
$$
\begin{array}{l}
q S_{n}=q\left(a_{1}+a_{2}+\cdots+a_{n}\right) \\
=a_{2}+a_{3}+\cdots+a_{n+1},
\end{array}
$$

we have, $S_{n+1}=q S_{n}+a_{1}$.
Thus, $S_{n+2}=q\left(q S_{n}+a_{1}\right)+a_{1}$
$$
=q^{2} S_{n}+a_{1}(q+1) \text {. }
$$

Comparing with the given condition, we get
$$
q^{2}=4, a_{1}(q+1)=3 \text {. }
$$

Therefore, $\left(q, a_{1}\right)=(2,1)$ or $(-2,-3)$.
Hence, $a_{2}=2$ or 6.