The situational irony at the heart of “After Twenty Years” is the fact that the patrolling police officer with whom Bob has an extended conversation about his friend Jimmy is, in fact, his friend Jimmy. While readers are not initially aware of this, it becomes clear via a classic O. Henry twist ending in which a different police officer (who has just arrested Bob for criminal charges) gives Bob a note from Jimmy that explains the whole thing, as seen in the following passage:
[Bob] unfolded the little piece of paper handed him. His hand was steady when he began to read, but it trembled a little by the time he had finished. The note was rather short.
“Bob: I was at the appointed place on time. When you struck the match to light your cigar I saw it was the face of the man wanted in Chicago. Somehow I couldn’t do it myself, so I went around and got a plain clothes man to do the job. “JIMMY.”
As Jimmy explains here, he initially approached their meeting place not as an on-duty police officer approaching someone suspicious (like Bob assumed), but as a man going to reunite with his friend. It was only when he saw Bob’s face and recognized him as a wanted criminal that Jimmy decided to approach the situation as a disinterested cop and then to send another officer to arrest the man.
The fact that Bob’s hand starts out steady when he receives the note but it “tremble[s] a bit” when he’s done hints at the fact that there are real emotional stakes to this moment. Bob was not emotional about being arrested, but is emotional about the fact that his dear friend, for whom Bob just traveled 1000 miles across the country, has prioritized professional duty over personal loyalty.