Polynomial factor in ring irreducible factors

Postman $ x ^ 5 + 1 $ in irreducible factors $ Z_2[x]$, and $ x ^ 4 + 1 $ in $ Z_5[x]$.

I'm not sure how to do it when the donated ring is not just Z. Any help would be great! Thanks in advance!