if we assume the older man is the professor and the younger man is the student, we are relying on the representativeness heuristic
Representativeness heuristic refers to a judgment that we made based on the probability under an uncertain event.
In this case, since the man is older, we can safely assume that that person has more academic experience than the younger one.