Answer :

naǫ
the cattle train
speed - 36.5 km/h
time - x h

the passenger train
speed - 29.2 km/h
time - (2.4+x) h

The cattle train caught up to the passenger train so the distance they travelled is the same.
Distance is speed times time.

[tex]36.5 \times x=29.2 \times (2.4+x) \\ 36.5x=70.08+29.2x \\ 36.5x-29.2x=70.08 \\ 7.3x=70.08 \\ x=\frac{70.08}{7.3} \\ x=9.6 \\ \\ 2.4+x=2.4+9.6=12[/tex]

The passenger train travelled for 12 hours before the cattle train caught up.
Used brute force to figure this one out and got lucky at t=12.

What you need to know:

[tex]d=\left| x-y \right| [/tex]

t = time travelled (in hours)

x = distance passenger train has travelled

y = distance cattle train has travelled

d = distance between both trains in km

------------------------------------

RESULTS AND TIME SNAPSHOTS:

When:

t=0, x=0, y=0, d=0

t=2.4, x=70.08, y=0, d=70.08

t=4.8, x=140.16, y=87.6, d=52.56

t=7.2, x=210.24, y=175.2, d=35.04

t=9.6, x=280.32, y=262.8, d=17.52

t=12, x=350.4, y=350.4, d=0 <-------

So your answer is 12 hours.