2 trains are 2 km apart and their lengths are 200m and 300m.They are approaching towards each other with a speed of 20m/s and 30m/s.After how much time they cross each other ?

Combined, they need to cover 2000+500m

relative speed: 50m/s

time=distance/velociyt=2500/50=50sec