Fold the 1st string to have 4 folds (fold it twice in the middle). Its length becomes 1/4 th. Light both strings. Start measuring after the folded string burns completely, it will be 45 minutes when the second strings completely burns.
Let us say the first friend F1 starts at A and the other friend F2 starts off at B.
AB = 36 miles. F1 travels to right toward B at 6 miles/hr and F2 travels towards A at 6 miles/hr. Pigeon starts from A towards B at 18 mph.
Relative velocity of F1 and F2 is = 6+6 = 12 mph. So they cover the distance AB in 36miles/12 mph = 3 hours.
So the pigeon flies in 3 hours = 3 * 18 mph = 54 miles.
Alternately, the long method:
Relative velocity of Pigeon and F2 = 18 + 6 = 24 mph. They have to a total of 36 miles to meet. So, they meet after 36 miles / 24 mph = 1.5 hours = 90 min.
In 90 minutes F1 has moved to a point C, 6*1.5 = 9 miles from A
and F2 has moved to a point D at a distance 9 miles from B or 27 miles from A.
Now the pigeon starts flying towards F1 and distance between F1 & pigeon is 18 miles.
So they take 18 miles/24 mph = 0.75 hr to meet.
By now A moves to a point E at 4.5 miles from C or 13.5 miles from A. Now F2 is at F, 13.5 miles from B or 22.5 miles from A. The distance between F1 and F2 is 9 miles.
Now pigeon flies towards F2 and meets F2 in 9/24 = 3/8 hrs. By now, F1 travels 3*6/8 = 2.25 miles to a point G at 15.75 miles from A and F2 is at 20.25 miles from A. The distance between them is 4.5 miles.
Now pigeon and F1 meet after 4.5/24 hrs. In this time F1 and F2 cover a distance of 2.25 miles. So distance between F1 and F2 becomes 2.25 miles.
The distance traveled by pigeon = 18 mph * [ 36 + 18 + 9 + 4.5 + 2.25 + .... ] / 24
= 18 * 36 * [ 1 + 1/2 + 1/4 + 1/8 + 1/16 + .... ] / 24
= 18 * 36 * 2 / 24 = 54 miles