Remember that,
#color(blue)("Average speed "=("Total distance travelled")/("Total time taken")#
The total distance travelled is #color(green)(d#
Now, let's calculate the time using the formula
#color(brown)("Speed"=("Distance ")/("Time")#
When the body moves with velocities #v_1 and v_2#, they take time #t_1 and t_2# and cover distances of #2/5 d and 3/5 d#
So,
#rArrcolor(green)(v_1=(2/5 d)/(t_1),t_1=(2/5 d)/v_1#
#rArrcolor(green)(v_2=(3/5 d)/(t_2),t_2=(3/5 d)/v_2#
Now combine all the values
#rarr"Average speed"=(d)/((2/5 d)/(v_1)+(3/5 d)/v_2#
#rarrd/(((2/5 dv_2)+(3/5 dv_1))/(v_1v_2))#
#rarr(dv_1v_2)/(2/5 dv_2+3/5 dv_1)#
#rarr(canceldv_1v_2)/(canceld(2/5 v_2+3/5 v_1))#
#rarr(v_1v_2)/((2v_2+3v_1)/5)#
#color(blue)(rArr(5v_1v_2)/(3v_1+2v_2)#
Hope this helps!!! ☺