Nearest place HELP

Hi, I need to know if I have how to know the device closest to the other. Example: The driver of the uber who is closest to the passenger is the one who is going to make the trip.