Answer :
Let x denotes the distance from P to Q.
Average speed of one way = 16 km/h
Average speed of the return = 12 km/h
The total distance covered for the whole trip is
[tex]\begin{gathered} total\; distance=x+x \\ total\; distance=2x \end{gathered}[/tex]Recall the relationship between time, distance, and speed.
[tex]time=\frac{distance}{speed}[/tex]The total time taken for the whole trip is
[tex]\begin{gathered} total\; time=t_1+t_2 \\ total\; time=\frac{x}{16}+\frac{x}{12} \\ total\; time=\frac{7x}{48} \end{gathered}[/tex]The average speed for the whole trip is
[tex]\begin{gathered} avg\; speed=\frac{total\; distance}{total\; time} \\ avg\; speed=\frac{2x}{\frac{7x}{48}} \\ avg\; speed=2x\cdot\frac{48}{7x} \\ avg\; speed=2\cdot\frac{48}{7} \\ avg\; speed=\frac{96}{7}\; \end{gathered}[/tex]Therefore, the average speed of the whole trip is 96/7 km/h