Lets take $p(x) = ax +b$
Now, $p(0) = 5 \implies b = 5.$
$p(1) = 4 \implies a + b = 4, a = -1$
$p(2) = 9 \implies 4a + b = 9 \implies -4 + 5 = 9$, which is false. So, degree $1$ is not possible.
Let $p(x) =$ $ax^{2}$ $+$ $bx$ $+$ $c$
$p(0) = 5 \implies c = 5$
$p(1) = 4 \implies a + b + c = 4 => a + b = -1 \quad \to(1)$
$p(2) = 9 \implies 4a + 2b + c = 9 => 2a + b = 2 \quad \to (2)$
$(2) - (1) \implies a = 3, b = -1 - 3 = -4$
$p(3) = 20 \implies 9a + 3b + c = 20, 27 -12 + 5 = 20$, equation holds.
So, degree $2$ also will suffice.