If earth had been flat, the answer had been 5km. But it is not and it depends. If I start from point close to the north pole, I walk 3km north, and then 4km east, which in my example, happens to be full circle around the northpole, which means that I am 3km from start.