Average velocity is defined as total distance travelled divided by the total time needed to travel said distance.
You know that the body travels half of the total distance with a velocity of v_0. Let's say that it takes the body a total time of t_(i) to travel half of the total distance.
The other half of the total distance is travelled with v_1 for half of the time, t_1, and with v_2 for the other half of the time, t_2. Let's say that the total time it took the body to travel the second half of the total ditance is t_(ii).
You know that
"distance" = "velocity" * "time"
You can use the fact that the two halves of the total distance are equal to write
underbrace(v_0 * t_i)_(color(blue)("first half")) = underbrace(v_1 * t_1 + v_2 * t_2)_(color(blue)("second half"))
But since t_1 = t_2 = "t_(ii)/2, you can write
v_0 * t_i = v_1 * t_(ii)/2 + v_2 * t_(ii)/2
v_0 * t_i = t_(ii)/2 * (v_1 + v_2) " "color(blue)((1))
This means that the average velocity can be written as
bar(v) = overbrace(v_0*t_i + t_(ii)/2(v_1 + v_2))^(color(green)("total distance"))/underbrace((t_i + t_(ii)))_(color(red)("total time"))
Use equation color(blue)((1)) to replace v_0 * t_i
bar(v) = (t_(ii)/2(v_1 + v_2) + t_(ii)/2(v_1 + v_2))/(t_i + t_(ii))
bar(v) = (t_(ii)(v_1 + v_2))/(t_i + t_(ii))
Use equation color(blue)((1)) again to express t_i in terms of the other parameters
t_i = t_(ii)/(2v_0) * (v_1 + v_2) " "color(blue)((2))
Use equation color(blue)((2)) into the main equation to get
bar(v)=(t_(Ii)(v_1 + v_2))/(t_(ii)/(2v_0) * (v_1 + v_2) + t_(ii))
bar(v) = (cancel(t_(ii))(v_1 + v_2))/(cancel(t_(ii))((v_1+v_2)/(2v_0) + 1))
Thus,
bar(v) = (v_1 + v_2)/((2v_0 + v_1 + v_2)/(2v_0)) = color(green)((2v_0(v_1 + v_2))/(2v_0 + v_1 + v_2))