What it sounds like you are talking about is using Subscripts, which is simple.
Select the letter, words, number, or numbers you want to subscript and then go to Format > Font > and then check Subscript. (As you will see, there are other options as well in that window). Once you have what you want checked, just press OK.
Using the steps I just explained and your example, this is what you should get:
m=Y2-Y1/X2-X1