What you pay for flights and hotels may have less to do with distance—and more to do with timing, behavior, and algorithms.