(5) B Hint: In $\triangle ABC$, $I$ is the incenter. Connect $AI$ and extend it to intersect $BC$ at point $D$, then the ratio in which $D$ divides $BC$ is
$$
\lambda=\frac{AB}{AC}=\frac{4}{2}=2.
$$

Thus,
$$
\overrightarrow{AD}=\frac{1}{3} \overrightarrow{AB}+\frac{2}{3} \overrightarrow{AC}.
$$

Also, since $BC=3$, we have $BD=2$, $DC=1$. In $\triangle ABD$, $I$ divides $AD$ in the ratio
$$
\lambda'=\frac{AB}{BD}=\frac{4}{2}=2,
$$

which means
$$
\overrightarrow{AI}=\frac{2}{3} \overrightarrow{AD}=\frac{2}{9} \overrightarrow{AB}+\frac{4}{9} \overrightarrow{AC},
$$

so $x+y=\frac{2}{3}$.
5. Given $I$ is the incenter of $\triangle A B C$, $A C=2, B C=3, A B=4$, if $\overrightarrow{A I}=$ $x \overrightarrow{A B}+y \overrightarrow{A C}$, then the value of $x+y$ is ( ).
(A) $\frac{1}{3}$
(B) $\frac{2}{3}$
(C) $\frac{4}{9}$
(D) $\frac{5}{9}$