Since the ball moves in the relative direction opposite to the displacement of the car, the speeds must be subtracted, so


Both move opposite directions. The attached graphic helps to better appreciate the problem in question, which concludes that the relative speed is 40km / s