Pergunta de entrevista da empresa Weir Group

A variant of the two-train problem was asked.