Motor car P travelling at 30km/h on straight road is overtaken by another car Q at 40 km/h. P immediately accelerates after travelling a distance of 0.5 km and overtakes second car Q which has kept its speed constant.
a.) Find the time taken.
b.) Find the greatest distance between the cars at this time.