'PROBLEMS' is an eight-letter word where none of the letters repeat.
We know that “$r$” objects, where all are distinct, can be reordered in $r!$ ways.
Therefore, if there had been no constraints, the letters of 'PROBLEMS' can be reordered in $8!$ ways.
However, the question states that '$P$' and '$S$' should occupy the first and last position respectively.
Therefore, the first and last position can be filled in only one way.
The remaining $6$ positions in between $P$ and $S$ can be filled with the $6$ letters in $6!$ ways.
Rearrangement Concepts: Number of ways to reorder objects: