4 answers

In most uses, more refers to quantity, while longer refers to time or size. You can have more sand in a box, but a longer waiting time or a longer extension cord.

In the first example you gave, you can say it either way.

In the second example, you can use "longer than" if you just mean a length of time. However, you are meaning it as "when" rather than "how long." The concept of "when" is not a quantity, but a specific time, a time period, or in a broader sense, a location. You could say:

"Sometimes this brand of paint lasts longer than 5 years."

You could use it in reference to age, but it may be simpler in some cases just to use the word "older" for that.

"Some people live for longer than 90 years."

"Some humans live for over 90 years."

"Some humans live to be older than 90 years."

"Some people live past age 90." (I kept switching the subject for variety, not for grammar.)

I think the key is the word "ago." When using this preposition, the words "longer than" are not used. Notice that in the first case, we are talking about how long the boy studied, but in the second case we are talking about when the dinosaurs lived. So in the first case "longer than" and "more than" modify "studied" but in the second case, they tell us how long "ago."

I can't think of a real grammatical reason for this; I think it is just convention.

We could also use "over" in the same way as "more than"; it works in both cases.

Much of this depends on the stylebook you are using. In journalism, it is absolutely WRONG to say, for instance, "Some humans live over 90 years." It would have to be MORE THAN, because you are referring to a numerical quantity. Colloquially, "over 90 years" is acceptable. I still wouldn't use it myself.

The "longer than" phrase feels awkward to me in all of the above cited cases but I can't give you a reason.

You are right. Ago is an adverb. And of course, "more than" -- rather than "over" -- is used for all numerical quantities. Of course, the conversation was about "more than" verses "longer than". The Chicago Manual of Style, when discussing hyphenated adjectives, provides numerous examples that illustrate the difference between sentences with and without "ago" and "of age" -- those examples follow a similar pattern to the use of "more than" and "longer than". This forum tends to focus on formal, academic English (either British or American). Perhaps this is due to the backgrounds of those who post. We make common reference to the Chicago, MLA, and APA style guides -- and less frequently to the ACS, AMA, and ASA guides. Because journalism tends to violate some of the strictures of formal academic writing, and because many of the questions come from students, we tend not to make reference to the various style guides that profession uses.