From the problem we know that both animals are running at constant speed and on a straight line, this means that the motion of both of them is a rectilinear motion and that their positions can be described as:

where x is the position at any given time, x0 is their initial position, v is the velocity and t is the time.
Now, let x be the length the hare ran; we know that its velocity is 20 times the velocity of the tortoise which means that it ran at 3 m/s; finally, we also know that it ran 2 minutes less than the tortoise, if we let t be the time the tortoise ran then the time the hare ran is t-120 (in seconds). Hence the position of the hare at any given time is:

For the tortoise we know that it ran 40 cm more than the hare (to the finish line) and that its velocity was 0.15 m/s, then for the tortoise we have:

Hence we have the system of equations:

Equating the x variable we have that:

Now that we have the value of t we can find the value of x:

Therefore, the race took 126.18 seconds and its length was 18.53 m