$\text{Speed(S)} = \dfrac{\text{Distance(D)}}{\text{Time(T)}}$
$\implies S \propto D$
$\implies S_{1}:S_{2} = D_{1}:D_{2}$
Let actual distance travelled by a person $k\,km.$
$\implies 20:24 = k : (k + 40)$
$\implies 5:6 = k : (k + 40)$
$\implies \dfrac{k}{k + 40} = \dfrac{5}{6}$
$\implies k = 200\,km.$
$$\textbf{(OR)}$$
Difference of the speed's$ = 24 - 20 = 4\,km/hr$
$\implies 4\,km/hr\longrightarrow 40\,km$
$\implies 20\,km/hr\longrightarrow \dfrac{40}{4}\times 20\,km = 200\,km$
So, the correct answer is $(C).$