I think that it is a common experience for people when they encounter one another (and then continue to know one another) to assess their own intelligence relative to the person that they are encountering. People will tend to feel either more or less intelligent than the person that they are measuring themselves against, though there must be occasions where a person measures themselves against another person and considers that they are equals in the intelligence stakes.
My thought about intelligence is though that what we perceive as intelligence is really just shorthand for a nebulous arrangement of ever-shifting factors; a person’s confidence (in all of the ways that can manifest, adjusted by experience, support network and means), a person’s education (access to training that worked for them), a person’s past traumas or lack of them, a person’s current stress level, a person’s ability to recall interesting or pertinent facts, a person’s preoccupation (or lack thereof) and so forth. All these things will impact people’s perceived levels of intelligence relative to another. We are often too hard on ourselves or another person when we measure them and consider one of us more intelligent.
The thought then is that intelligence is often down to patterns of luck and nothing intrinsic in the person being assessed.