Impossible to determine with information provided.
"how much longer will both trains pass each other?"
the length of the trains was not given, therefore one has no ability to determine the length of time the trains will be occupying similar points on their journeys.