Used brute force to figure this one out and got lucky at t=12.
What you need to know:
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.