In the first leg, the motorist for
[tex]\dfrac{160\,\mathrm{km}}{80\,\frac{\mathrm{km}}{\mathrm h}}=2\,\mathrm h[/tex]
and in the second leg, for
[tex]\dfrac{160\,\mathrm{km}}{100\,\frac{\mathrm{km}}{\mathrm h}}=1.6\,\mathrm h[/tex]
giving a total travel time of 3.6 hours. The average speed over the total duration is then
[tex]\bar v=\dfrac{160\,\mathrm{km}+160\,\mathrm{km}}{3.6\,\mathrm h}\approx88.9\,\frac{\mathrm{km}}{\mathrm h}[/tex]