In this case change the reference frame from being stationary to moving with the velocity of the train
Let this frame of reference be moving with a speed of 8m/s .
Now lets calculate new velocities of train and parrot.
Now the problem has been converted to one body problem
A parrot with velocity 12m/s has to cover a distance of 120 m. Calculate the time required.
Using
s=vt
t=s/v
t=120/12
t=10sect=10sec
So 10 seconds is the time required by the parrot to cover a distance of 120 m of a moving train with a velocity of 8 m/s