A train of length $200 \mathrm{~m}$ travelling at $30 \mathrm{~m} \mathrm{~s}^{-1}$ overtakes another train of length $300 \mathrm{~m}$ travelling at $20 \mathrm{~m} \mathrm{~s}^{-1}$ in the same direction on a parallel track. The time taken by the first train to cross the second is
(a) $30 \mathrm{~s}$
(b) $50 \mathrm{~s}$
(c) $10 \mathrm{~s}$
(d) $20 \mathrm{~s}$