5. If $|a-b|=1,|b+c|=1,|a+c|$ $=2$, then $|a+b+2 c|$ equals $(\quad)$.
(A) 3
(B) 2
(C) 1
(D) 0
5. A.

From $|a-b|=1$, we know $a-b=1$ or $a-b=-1$;
From $|b+c|=1$, we know $b+c=1$ or $b+c=-1$;
From $|a+c|=2$, we know $a+c=2$ or $a+c=-2$.
Thus, we can obtain $2^{3}=8$ systems of three linear equations:
(1) $a-b=1, b+c=1, a+c=2$;
(2) $a-b=1, b+c=1, a+c=-2$;
(3) $a-b=1, b+c=-1, a+c=2$;
(4) $a-b=1, b+c=-1, a+c=-2$;
(5) $a-b=-1, b+c=1, a+c=2$;
(6) $a-b=-1, b+c=1, a+c=-2$;
(7) $a-b=-1, b+c=-1, a+c=2$;
(8) $a-b=-1, b+c=-1, a+c=-2$.
For (2) to (7), adding the first two equations gives a value of $a+c$ that differs from the third equation, so these six cases will not occur.
For (1), we have $a=2-c, b=1-c$, so,
$$
a+b+2 c=3 \text {. }
$$

For (8), we have $a=-2-c, b=-1-c$, so,
$$
a+b+2 c=-3 \text {. }
$$

Therefore, $|a+b+2 c|=3$.