Time taken by the boy to go from his home to Time taken by the boy to go from his home to the market, $t_1 =\frac{2.5\,km}{5\,km\,h^{-1}}=\frac{1}{2}h$
Time taken by the boy to return back from the market to his home, $t_{2}=\frac{2.5\,km}{7.5\,km\,h^{-1}}=\frac{1}{3}h$
$\therefore$ Total time taken $=t_{1}+t_{2}=\frac{1}{2}h+\frac{1}{3}h=\frac{5}{6}h=50\,min$
In $t = 0$ to $50 \,min,$
Total distance travelled $= 2.5 \,km + 2.5 \,km = 5\, km$
Displacement $= 0$ (As the boy returns back home)
$\therefore$ Average speed $=\frac{\text{Distance travelled}}{\text{Time taken}}=\frac{5\,km}{\frac{5}{6}h}=6\,km\,h^{-1}$
Average velocit $=\frac{\text{Displacement}}{\text{Time taken}}=0$