30: The right formula is
Differentiation gives
Use this with
Remark: Note that we have the following.
This agrees with common sense. At the beginning, the cars go practically on the level and so their distance does not immediately change. After a longer time, the faster car gets way ahead of the slower one and thus it is almost in front of it, the offset by 10 km becomes negligible, so their distance more or less increases by the mutual difference in speeds.