Example 1 A mall installs an escalator from the first floor to the second floor, which moves upward at a uniform speed. A boy and a girl start walking up the escalator at the same time (the escalator is also moving). If both of their movements are considered uniform, and the boy walks twice as many steps per minute as the girl, it is known that the boy walked 27 steps to reach the top of the escalator, while the girl walked 18 steps to reach the top (assuming the boy and the girl each step up one step at a time).
(1) How many steps are visible on the escalator?
(2) If there is a staircase near the escalator that leads from the second floor to the first floor, with the same number of steps as the escalator, and both individuals walk down the stairs at their original speeds, then reach the bottom and ride the escalator again (ignoring the distance between the escalator and the stairs), how many steps will the boy have walked when he catches up to the girl for the first time?
(9th Jiangsu Province Junior High School Mathematics Competition)
Explanation: (1) Let the girl's speed be $x$ steps/min, the escalator's speed be $y$ steps/min, the boy's speed be $2x$ steps/min, and the stairs have $s$ steps. Then
$$
\left\{\begin{array}{l}
\frac{27}{2 x}=\frac{s-27}{y}, \\
\frac{18}{x}=\frac{s-18}{y} .
\end{array}\right.
$$
(1)
$$
\frac{3}{4}=\frac{s-27}{s-18} \text {. }
$$

Solving for $s$ gives $s=54$.
Therefore, the part of the escalator exposed is 54 steps.
(2) From (1), we know $y=2x$.

Let the boy pass the girl for the first time after walking the escalator $m$ times and the stairs $n$ times, then the girl has walked the escalator $m-1$ times and the stairs $n-1$ times. The boy walks up the escalator at $4x$ steps/min, and the girl walks up the escalator at $3x$ steps/min. Then
$$
\frac{54 m}{4 x}+\frac{54 n}{2 x}=\frac{54(m-1)}{3 x}+\frac{54(n-1)}{x} \text {. }
$$

Thus, $\frac{m}{4}+\frac{n}{2}=\frac{m-1}{3}+\frac{n-1}{1}$, which simplifies to
$$
6 n+m=16 \text {. }
$$

Since $m$ and $n$ must be positive integers, and $0 \leqslant m-n \leqslant 1$. Therefore, we can get Table 1.
Table 1
\begin{tabular}{|c|c|c|c|c|c|}
\hline$m$ & 1 & 2 & 3 & 4 & 5 \\
\hline$n=\frac{16-m}{6}$ & $2 \frac{1}{2}$ & $2 \frac{1}{3}$ & $2 \frac{1}{6}$ & 2 & $1 \frac{5}{6}$ \\
\hline$n$ & 1 & 2 & & & \\
\hline$m=16-6 n$ & 10 & 4 & & & \\
\hline
\end{tabular}

From Table 1, we can see that the only solution is $m=3, n=2 \frac{1}{6}$, meaning the boy walks up the escalator 3 times and down the stairs $2 \frac{1}{6}$ times.

Therefore, when the boy first catches up with the girl, he has walked $3 \times 27 + 2 \frac{1}{6} \times 54 = 198$ steps.

Note: Indeterminate equation problems in math competitions can often be solved using the tabulation method.