Velocity of Half of distance traveled = V0
Let D1 be the distance traveled with a velocity of V1 and T be the time taken to travel this distance and D2 be the distance traveled with the velocity of V1 and T be the time taken to travel this distance.
V1 =D1/T and V2 = D2/T
or D1 = V1T and D2 = V2T
Hence total distance Traveled = D1 + D2 = V1T + V2T = T (V1+V2)
also total time = T+T = 2T
Average Velocity of Second half of Journey Vr= total distance / total time
Vr= T(V1+V2)/2T = V1+V2/T
Since body travels half of the distance with a velocity V0 and The remaining half with a velocity (Average Velocity Vr) , therefore the average velocity of the body is given as
Vavg = 2V0Vr/V0+Vr
=2V0(V1+V2)/2 / V0+(V1+V2/2)
=2V0V1+2V0V2 / 2V0+V1+V2
Hope this helps you!!!