Carl has to travel a certain distance. After he has travelled 40 kilometres, he increases his speed by 2 kilometres per hour. If he had travelled with this increased speed during the whole of his journey, he would have arrived 40 minutes earlier at his destination. On the other hand, if he had continued with his original speed, he would have arrived 20 minutes later.
How far did Carl have to travel?