(He is having trouble getting good views of her legs, because he is right next to her, and has to lean back and tilt his head to inspect them.) To make matters worse, Rachel has said she is a criminal lawyer.
Randy is a tax lawyer, and they are bantering about the legal scene.
So he tries to screen out anything that might lessen his prowess if a woman invites him to perform. When a man spies a woman who is really "his type" -- whatever this may be -- he thinks he has found someone whose sexual needs he could enthusiastically fulfill.
You are being studied to see whether you are likely to defeat him as a lover.
I mean this in the most literal way: he wants to know whether in your presence he might be unable to perform.
They strike up a conversation with her while they wait for their respective tables.
The woman, Rachel, is friendly, glad to have someone to talk to while she waits for a friend to show up.
But therein lies the rub: how does he know which women are "right"?