2. In $\triangle A B C$, $I$ is the incenter, and $C A+A I=$ $B C$. If $\angle A=80^{\circ}$, then $\angle B=$ $\qquad$
$2.40^{\circ}$. 
As shown in Figure 7, connect $B I$ and $C I$, and take a point $D$ on $B C$ such that $C D = C A$, then connect $I D$.
Given $C A + A I = B C$, then
$D B = A I$.
It is easy to prove $\triangle A C I \cong \triangle D C I$
$$
\begin{array}{l}
\Rightarrow A I = I D = D B, \angle D I B = \angle D B I \\
\Rightarrow \angle C A I = \frac{1}{2} \angle A = \angle I D C = 2 \angle D B I = \angle B \\
\Rightarrow \angle B = \frac{1}{2} \angle A = 40^{\circ} .
\end{array}
$$