A motorist drives at a constant speed of X km/h for 40k and then increases the speed by 20km/h to travel the next 250km. If the whole journey takes 3 hours,calculate X.

since time = distance/speed,

40/x + 250/(x+20) = 3