We know that m is third in the first, scenario, so let's focus on the second scenario. For the remaining four slots, we know that L is before N, and that L and O are exactly one apart. We could have a valid scenario where L is third.
O S L N M T P
However, let's see what happens when we put S third
_ _ S _ M T P
This means that either l or o would need to go second and fourth, forcing N in first, violating the rule that n can't be before l.