First, let's write the following system of linear equations pertinent to the problem, where x and y stand for the speed (km/h) of the faster and slower cars, correspondingly.
90/x = (90/y) -1
Next in the first equation re-written as:
90(x-24)=90x - x(x-24)
90x-2160 = 90x - x2 +24x
The following Quadratic equation in its canonical form (you can solve it using online Quadratic Equation Solver: http://examn8.com/QuadraticEquations.aspx)
has only one positive solution: x=60 (the second one is a negative value, which does not apply to this problem). Therefore the speed of the faster car is 60 km/h and the speed of the slower car is correspondingly: y=60-24=36km/h
Quick check: the travel time of the faster car is: 90/60 = 1.5hr, the travel time of the slower car is 90/36=2.5hr.
Hope this may help.