Let the speed of the second train be x km/hr. Then,
Relative speed of trains = (\(x\) + 50) km/hr
= (\(x\) + 50) x \(\frac{5}{18}\) m/s
Total time taken = \(\frac{\text{Sum of lengths of both the trains}}{\text{Relative speed}}\)
= \(\frac{108\,m\,+112\,m}{(x\,+50)\times\frac{5}{18}}\)
⇒ \(\frac{220\times18}{(x\,+50)\times5}\) = 6
⇒ 44 × 3 = x + 50 ⇒ 132 = x + 50 ⇒ x = 132 – 50 = 82 km/hr.