Can you rephrase the question? I don't understand what you're asking.
[Would comment, but insufficient reputation]
So maybe a good way to start is to describe the distance remaining between the trains as a function of time, which seems to me like it should be
$$ d(t) = 60 - 60t, 0<t<1$$
since in the rest frame of one train the other is coming at it at 60km/h.
Moreover, in this frame the bird is moving forward at 30km/h, so it will meet the other train exactly when
$$ 30t_1 = 60 - 60t_1 $$
$$ 90t_1 = 60$$
$$ t_1 = 2/3 $$
At this point the trains are 20km apart. It's convenient to switch to the rest frame of the other train now. Again the bird moves forward at 30km/h while the original train now approaches at 60km/h. If $t_2$ is the time between when the bird hits the second train and when it reaches the first train again, we require that
$$ 30t_2 = 20 - 60t_2 $$
$$ 90t_2 = 20 $$
$$ t_2 = 2/9 $$.
You may be starting to notice a pattern. If there's any justice in the world, $t_3$ better come out to be $2/3^3 = 2/27$ and $t_n$ should be $2/3^n$. So we just need to sum them up:
$$ t_{total} = \sum_1^\infty{t_n} = \sum_1^\infty{\frac{2}{3^n}} $$
$$ = 2 \sum_1^\infty{(\frac{1}{3})^n} $$
This sum is geometric. We find
$$ t_{total} = 2 (\frac{1}{1-1/3}-1) = 2 \frac{1}{2} = 1 $$
So it takes the bird 1 hour total, traveling at 30km/h = 1/120 km/s, so its total distance is
$$ d_{total} = 3*(1/120) = 1/40 km $$