Question 490168
For average speed, always use (total distance) / (total time)
Let the entire distance = {{{d}}} km
car's time for 1st {{{ d/4 }}}
{{{ t[1] = (d/4)/40 }}}
{{{ t[1] = d/160 }}} hrs
car's time for 2nd {{{ d/4 }}}
{{{ t[2] = (d/4)/50 }}} 
{{{ t[2] = d/200 }}} hrs
car's time for last {{{ d/2 }}}
{{{ t[3] = (d/2)/90 }}}
{{{ t[3] = d/180 }}} hrs
average speed = {{{ d / (d/160 + d/200 + d/180) }}}
Divide top and bottom by {{{ d}}}
average speed = {{{ 1 / (1/160 + 1/200 + 1/180) }}}
Multiply top and bottom by {{{ 20 }}}
average speed = {{{ 20 / (1/8 + 1/10 + 1/9) }}}
Multiply top and bottom by {{{360}}}
average speed = {{{ 7200 / (45 + 36 + 40) }}}
average speed = {{{ 7200 / 121 = 59.5 }}} km/hr