write a real world problem that can be solved using the distance formula