50 minutes. A starts with the bike and gives it to B after 33.33 minutes.
To make A and B match their speed, for every hour A cycles (7 km), B walks 5 km. To make up for the 2 km difference, B needs to cycle 1/2 hour ( 4 / 8) covering 4 km, while A walks 2 km during that time.
That makes the average speed of A: 2/3 * 7 + 1/3 * 4 = 6 km/h. For B: 2/3 * 5 + 1/3 * 8 = 6 km/hr. C walks the whole time, so his speed is 6 km/hr.
As the speed of all of them is now identical, it will take them 50 minutes to cover the 5 km.
Hope I helped you! :)