The addition of -th/ -eth relates to numbers 4 to 20 (and similarly,) and is a suffix to the cardinal number. However, as in the second and third examples, the rd & st simply come from the right-end of the word for the ordinal number: 3 rd: thi rd. 301 st: (three-hundred-) fir st (shouldn't that be 301 th?, I'm not going there). More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.