A knight that cannot reach the promotion square in one or two moves is irrelevant. Count the knight's route before deciding whether a passed pawn can be stopped.
White's pawn is on d7 and the black knight on b3 wants to stop it. Which squares control d8? b7, c6, e6, f7. The knight would need two moves to reach any of them, and the pawn promotes in one. Black's king on a1 is useless. So d8=Q wins at once, and the game becomes queen versus knight, a routine win (the queen dominates the knight and the king closes in).