5. As shown in the figure, $M$ is the midpoint of arc $C A B$, and $M P$ is perpendicular to chord $A B$ at $P$. If the length of chord $A C$ is $x$, and the length of segment $A P$ is ($x$ +1), then the length of segment $P B$ is ( ).
(A) $3 x+1$
(B) $2 x+3$
(C) $2 x+2$
(D) $2 x+1$
5. D.

Take a point $D$ on $AB$ such that $PD=PA$, and draw $MA$, $MD$. Then $\triangle AMD$ is an isosceles triangle, $MA=MD$. Extend $CA$ to $E$, and draw $MC$, $MB$, $BC$. Since $M$ is the midpoint of $\overparen{CAB}$, we have $MC=MB$.

Thus, $\angle EAM=\angle CBM=\angle BCM=\angle MAB$ $=\angle MDA$.
Therefore, $\angle MAC=\angle MDB$.

Also, $\angle ACM=\angle DBM$,
$\therefore \triangle MAC \cong \triangle MDB, AC=DB$.
Hence, $PB=PD+DB$
$$
\begin{array}{l}
=AP+AC=(x+1)+x \\
=2x+1 .
\end{array}
$$