You can calculate the answer by multiplying the speed of the first train by the time and dividing it by the difference of speeds.
Erantzuna kalkula dezakezu aurreneko trenaren abiadura denborarekin bidertuz eta abiaduren arteko diferentziarekin zatituz.