Difference between polynomial functions and polynomials and why these two polynomial functions are equal?

$a(0) = (0)^5 + 1 \equiv 1$ mod $5$.

$b(0) = (0) - 4 = -4 \equiv1$ mod $5$

Remember numbers in $\mathbb{Z}_5$ are the same if they differ by a multiple of 5.