3. Two players, A and B, are playing a table tennis match, agreeing that the winner of each game gets 1 point and the loser gets 0 points. The match stops when one player is 2 points ahead or after 6 games have been played. Suppose the probability of A winning each game is $\frac{2}{3}$, and the probability of B winning each game is $\frac{1}{3}$, with the outcomes of each game being independent. Then the expected number of games played, $E \xi$, when the match stops is ( ).
(A) $\frac{241}{81}$
(B) $\frac{266}{81}$
(C) $\frac{274}{81}$
(D) $\frac{670}{243}$
3. B.

According to the problem, all possible values of $\xi$ are $2, 4, 6$.
Let each two games be a round. Then the probability that the match stops at the end of this round is $\left(\frac{2}{3}\right)^{2}+\left(\frac{1}{3}\right)^{2}=\frac{5}{9}$.

If the match continues after this round, then A and B must each have scored 1 point in this round, and the result of this round has no impact on whether the match stops in the next round. Therefore,
$$
\begin{array}{l}
P(\xi=2)=\frac{5}{9}, P(\xi=4)=\frac{4}{9} \times \frac{5}{9}=\frac{20}{81}, \\
P(\xi=6)=\left(\frac{4}{9}\right)^{2}=\frac{16}{81} .
\end{array}
$$

Thus, $E \xi=2 \times \frac{5}{9}+4 \times \frac{20}{81}+6 \times \frac{16}{81}=\frac{266}{81}$.