Let the speed of the second train be y km/hr
Relative speed of both trains = (50 + y) km/hr
Total distance traveled = 100 + 120 = 220 meters = 0.22 km
Time = 6 sec = 6/( 60 x 60) hr.
Speed = distance/time
⇒ 50 + y = (0.22 x 60 x 60)/ 6
⇒ 50 + y = 132
∴ y = 82
∴ Speed of the second train = 82 km/hr