Step 1: Define variables.
Let present (initial) numbers be: men \(= m\), women \(= w\) with \(w = \dfrac{m}{2}\).
Step 2: Use the condition after the stop at Y.
At Y: men \(= m-10\), women \(= w+5\).
Equality there gives \(m - 10 = w + 5 \Rightarrow m - w = 15\).
Step 3: Solve the system.
Since \(w = \dfrac{m}{2}\), we have \(m - \dfrac{m}{2} = 15 \Rightarrow \dfrac{m}{2} = 15 \Rightarrow m = 30\).
Hence \(w = \dfrac{m}{2} = 15\).
Step 4: Conclude total initially.
Initial passengers \(= m + w = 30 + 15 = \boxed{45}\).