$v_1=\dfrac {120}{10}=12 m/s$

$v_2=\dfrac{120}{15}=8 m/s$

I'm not sure exactly what "cross each other" means.

Assuming you mean the time from when their fronts are at the same position to the time when their rears are at the same position then effectively what you have is 1 train moving at the sum of the two speeds covering a distance of 240 metres.

$t=\dfrac {240}{12+8}=\dfrac{240}{20}=12s$