You can translate it word by word to “to have had”, and as far as I can tell, it has the same meaning.
Avoir eu is called the past infinitive of avoir, and “indicates an action that occurred before the action of the main verb, but only when the subject of both verbs is the same.”
The second part of it is “être quelques-uns à faire quelque chose”, which does not translate very well in English, but means “those who did this (or to whom this happened) were, say, a few”.
Here, “they were 2 out of 14 to pass the exam” seems not so poorly said. (Or “… to have received their diploma”, to stick to the french construction)