Speed of train \(= 90 \text{ km/h} = 90 \times \frac{1000}{3600} = 25 \text{ m/s}\).
Time taken to cross tunnel \(= 40 \text{ s}\).
Let the length of the train be \(L \text{ meters}\). The train covers the length of the tunnel plus its own length while crossing.
Total distance covered \(= 400 + L\) meters.
Using formula:
\[
\text{Distance} = \text{Speed} \times \text{Time}
\]
\[
400 + L = 25 \times 40 = 1000 \text{ meters}
\]
\[
L = 1000 - 400 = 600 \text{ meters}
\]
Wait, the answer calculated is 600 meters which matches option (b). Let's double-check.
Recalculation:
\[
\text{Speed} = 90 \times \frac{1000}{3600} = 25 \text{ m/s}
\]
\[
\text{Distance} = \text{Speed} \times \text{Time} = 25 \times 40 = 1000 \text{ m}
\]
Length of train \(L = 1000 - 400 = 600 \text{ m}\)
Hence correct answer is (b) 600 meters, not 500.