If b^3 + b^2 + 1 is divisible by 5, the ones' digit in b^3 + b^2 + 1 has to be 0 or 5. Another way to say this is that b^3 + b^2 + 1

0 mod 5.
Work with the integers modulo 5.
If b

0 mod 5, then b^3

0 mod 5, b^2

0 mod 5, so b^3 + b^2 + 1

1 mod 5. This means that the ones' digit has to be either 1 or 9.
If b

1 mod 5, then b^3

1 mod 5, b^2

1 mod 5, so b^3 + b^2 + 1

3 mod 5. This means that the ones' digit has to be either 3 or 8. Because b^3 + b^2 + 1 is always odd, you'll never get an 8 digit in the ones' place, so for this case, the ones' digit has to be 3.
Continue this process for the other three equivalence classes to complete this proof.