Black's h-pawn is running and your king looks too slow to catch it. Your a5 pawn saves you without ever moving, because the threat to push it wins the time you are missing. The rule: walk your king where it helps your own pawn and heads for the square of his pawn at the same time.