Since the segments AB and BC are connected by the point B, the sum of their lengths is equal the length of segment AC.
So we have that:
[tex]\begin{gathered} AB+BC=AC \\ x+1+x+7=16 \\ 2x+8=16 \\ 2x=16-8 \\ 2x=8 \\ x=\frac{8}{2} \\ x=4 \end{gathered}[/tex]Calculating the length of AB:
[tex]\begin{gathered} AB=x+1 \\ AB=4+1 \\ AB=5 \end{gathered}[/tex]