a) There are 4 spaces: _ _ _ _
You must put M in one of the four spaces = 4 possible ways.
The remaining three spaces may be filled by: D,O,E,S,T,I = 6*5*4 = 120 possible ways.
4*120 = 480 possible ways.
Think of it as: there are 120 possible ways to choose 3 different letters from D,O,E,S,T,I. And We multiply it by 4 possible ways we could insert M into that mix of 3 letters to make 4 letters in total.
b) There are 4 spaces: _ _ _ _
O and M must be in two of the four spaces. You can arrange O and M in 4 * 3 = 12 possible ways.
The remaining two spaces are filled by D,E,S,T,I,C. You can arrange them in 6 * 5 = 30 possible ways
12*30 = 360 possible ways.
Think of it as: there are 12 possible ways to choose spots for O and M. And We multiply this by the 30 possible ways we can insert the other letters into the mix to make 4 letters in total.
---
That's my way of thinking for this question. Hope it helps!
If this doesn't help; you could start writing the possible arrangements of letters and think of how to make a "tree of possible outcomes" with them to picture it better. That's how I would continue explaining my logic if this isn't enough.