Why is distance not calculated properly?

Well THIS IS WHY!?!?!?!