\(V _{ A }=90 \frac{ km }{ hr }=90 \times \frac{5}{18}=25\,m / s\)
Velocity of train \(B\)
\(V _{ B }=54 \frac{ km }{ hr }=54 \times \frac{5}{18}=15\,m / s\)
Velocity of train B w.r.t. \(\operatorname{train} A=\overrightarrow{ V }_{ B }-\overrightarrow{ V }_{ A }\)
\(=15-(-25)\,m / s\)
\(=40\,m / s\)
\(\text { Time of crossing }=\frac{\text { length of train }}{\text { relative velocity }}\)
\((8)=\frac{\ell}{40}\)
\(\ell=8 \times 40=320 \text { meter. }\)