2. Given the sets
$$
A=\left\{n^{2}+1 \mid n \in \mathbf{Z}_{+}\right\}, B=\left\{n^{3}+1 \mid n \in \mathbf{Z}_{+}\right\} \text {. }
$$

Arrange all elements in $A \cap B$ in ascending order to form the sequence $a_{1}, a_{2}, \cdots$. Then the units digit of $a_{99}$ is
2. 2 .

From the given, we know that $A \cap B=\left\{n^{6}+1 \mid n \in \mathbf{Z}_{+}\right\}$.
Therefore, $a_{99}=99^{6}+1$.
Thus, its unit digit is 2.