Given the task definition and input, reply with output. The task is to generate the correct answer for a given math problem.

Problem: two trains 500 m and 750 m long run at the speed of 60 km / hr and 40 km / hr respectively in opposite directions on parallel tracks . the time which they take to cross each other is ?
45