I have written this code for two line segments. I want to line them up to show that you can take sub intervals of the original, and add it to the new line segment.
\begin{center}
{$\overline{\rm AB}$}
\begin{tikzpicture}
\draw (0,0) -- (5,0) ;
\end{tikzpicture}
\end{center}
\begin{center}
{$\overline{\rm CD}$}
\begin{tikzpicture}
\draw (0,0) -- (7.5,0) ;
\end{tikzpicture}
\end{center}
I'd love something like this:

