Step 1: Concept
Speed $= \frac{Distance}{Time}$.
Step 2: Analysis
Speed of the second train $= \frac{400}{4} = 100$ kmph.
Step 3: Calculation
Ratio of speeds $= 7 : 8$.
Let speeds be $7x$ and $8x$.
$8x = 100 \implies x = \frac{100}{8} = 12.5$.
Speed of the first train $= 7x = 7 \times 12.5 = 87.5$ kmph.
Step 4: Conclusion
Hence, the speed of the first train is 87.5 kmph.
Final Answer: (D)