what is formula to show how much time it took car to travel 7km is .4hrs

From your data, "how much time" = .4 hours = .4 *60 min. = 24 minutes.