Answer:
5! (5 factorial) or 120 ways
Explanation:
You can arrange P different ways. R can be arranged only 4 different ways because Pwill be in one of the spots. Next, you can arrange "I" 3 different ways because P and R are already arranged in 2 spots, meaning you cant put "I" there. Next, S can be arranged in 2 different ways for the same reason. And lastly, M can only be arranged in 1 different way because the other spots are taken.
You can put it in any order. For example, M could be arranged 5 ways and P could be arranged in 1 way. You will still get 120 ways
Hopefully this helped. The explanation might be a bit confusing but I tried my best. I'm not good with explaining my solutions but I always try