【Example 5】 $n$ people line up, with $r$ people standing between person A and person B, and also $r$ people standing between person B and person C $(0<2 r<n-3)$. How many different ways can they line up?
First, select $r$ people from the $n-3$ people other than A, B, and C to be placed between A and B, and B and C, respectively. This is a multi-group combination problem, with $\binom{n-3}{r r}$ different ways. Arrange these $2 r$ people together with A, B, and C. Since there are two ways to arrange A, B, and C (ABC and CBA), and the $2 r$ people can be arranged in $r! \cdot r!$ different ways, there are $2 \cdot(r!)^{2}$ different ways. Arrange the remaining $n-2 r-3$ people, which can be done in $(n-2 r-3)!$ different ways. Finally, treat the $2 r+3$ people, including A, B, and C, as a single unit and insert them into the queue, which can be done in $n-2 r-1$ different ways. Therefore, there are
\[
\begin{array}{l}
\binom{n-3}{r r} \cdot 2(r!)^{2} \cdot(n-2 r-3)!\cdot(n-2 r-1) \\
\quad=2(n-2 r-2)(n-3)!
\end{array}
\]
different ways to arrange the queue.