First, determine what is the "sample space" of possible outcomes with 4 slots and the letters a m h t ? I always like to start with the first slot and work my way though each slot. The first slot can occupy any of the 4 letters, the next slot again can be any of the 4 letters, The same is true for the last two slots. So, in total, you have 4 x 4 x 4 x 4 possible combinations or 256 ways of displaying those 4 letters. 256 is your sample space and will be the denominator of your calculation.
Now, lets work on the numerator of your calculation. The 4 letters can be arranged to form the word "math" only one way, so the numerator must be equal to 1. Hope this helps