The total time duration For the two cars to meet

= total distance/relative velocity

= 36 km / (18+27) kmph = 4/5 hours

In this duration, the 1st car travels : 4/5 hr* 18 kmph = 14.4 km

That is the meeting point.

In this time period, the bird could travel : 4/5 hr * 36 kmph = 28.8 km

This is the total distance travelled by the bird. ..

displacement from starting position will be = distance of the meeting point from the starting point of 1st car: 14.4 km

=======================================

alternately,

Bird meets car2, after t = 36/63 hr = 4/7 hr

At this time distance between car1 and bird/car2: 4/7 *(36-18)=72/7 km

Bird meets car1 after : (72/7) / 54 hrs = 4/21 hrs ie., at total time 16/21 hrs total

The distance between bird/car1 and car2 is now: 36 - (16/21)*45 = 12/7 km

Bird meets car2 now after (12/7) km/63 kmph = 4/147 hrs at time total = 116/147 hrs

Now the distance between Bird/Car2 and car1 will be: 36 - 116/147 * 45 = 72/147 km

Bird meets car1 now after: (72/147) / 54 =4 / 441 hrs at total time: 352/441 hrs

Now distance between car1/Bird and car2 is: 36 - 352/441 * 45 = 12 /147

The shuttling durations of bird are: 4/7, 4/21, 4/147, 4/441,

Distance 36, 12/7 , 12/147

Total of the shuttling times = 4/7 + 4/147 + ... + 4/21 + 4/441+...

= (4/7) / [1 - 1/21] + (4/21) / [1 - 1/21]

= 3 / 5 hrs. + 1/5 hrs = 4/5 hours

Total distance travelled by bird: 4/5 hrs * 36 kmph = 28.8 km