The task is to generate the correct answer for a given math problem.

Problem: from mumbai railway station , two trains a and b start simultaneously from stations 400 miles apart , and travel the same route toward each other on adjacent parallel tracks . if train a and train b travel at a constant rate of 40 miles per hour and 40 miles per hour , respectively , how many miles will train a have traveled when the trains pass each other , to the nearest mile ?
18