You can see from the graph that the motor cycle never stops increasing its distance until it gets to 40km from home. That we suppose that it goes approximately in a straight line I guess. Otherwise, there is really no way to know the traveled distance. e.g. it could go in a circle for 100km and the distance from home would stay the same. And then its comes back to its beginning point. Its thus makes again 40 km.