Explanation:
Let the speed of train1=v1
and the length of train1=d1
Let the speed of train2=d2
and the distance of train2=d2
According to question,
27=d1/v1
d1=27×v1 ....(i)
17=d2/v2
d2=17×v2 .....(ii)
Again, according to question,
23=17v2+27v1/v1+v2
23v1+23v2=17v2+27v1
4v1=6v2
v1/v2=6/4
v1:v2 = 3:2