The general formula to use here is
speed = distance/time, where both distance and time can be expressed in different relevant units (for example, miles per hour for speedometer readings or meters per second, which are SI units).
In the given particular example, we find the speed of the car by dividing the distance it travels by the time it takes:
speed = 60 miles / 1.5 hours = 40 miles per hour (or 40 mph).
As long as we know the values of the two variables involved in the expression, we can readily find the third.
Example flipped question: For a car traveling at a constant speed of 40 miles per hour, how many miles can it travel in 1.5 hours?
Answer: We use the general formula:
speed = distance/time
We want to find the distance, so we multiply both sides by 'time' to get:
distance = speed x time
distance = 40 miles/hour x 1.5 hours = 60 miles.