How can you tell from the story that the policeman is Jimmy in "After Twenty Years"?
Jimmy's letter shows he was the policeman who conversed with Bob in the beginning of the story.
In the letter, Jimmy mentions he was on time to meet Bob. While speaking with him, however, he recognized Bob as a criminal wanted by Chicago cops. Jimmy asks a plainclothes officer to impersonate him because he can't bring himself to arrest a man he used to call a friend.
I didn’t want to arrest you myself. So I went and got another cop and sent him to do the job.
The contents of the letter make it clear Jimmy was the police officer. As we look back at the story, the letter explains why Jimmy asked how long Bob was willing to wait:
“I’ll go on my way,” he said. “I hope your friend comes all right. If he isn’t here at ten, are you going to leave?” “I am not!” said the other. “I’ll wait half an hour, at least. If Jimmy is alive on earth, he’ll be here by that time. Good night, officer.”
Based on Bob's answer, Jimmy may have concluded half an hour was plenty of time for another officer to impersonate him and meet with Bob.
Bob's answer also shows he still has some affection for his old friend, Jimmy. The men may not be close now, but past memories and shared experiences are often difficult to forget. This is perhaps the reason Jimmy sends another officer to do his job.
O. Henry must have understood the way he told his story could cause some confusion. We do not know the names of either the beat cop or Bob during the time they are talking. One thing O. Henry uses to identify the cop as Bob's old friend is the cigar. In the note handed to Bob by the arresting plainclothes officer at the end of the story, one sentence reads
When you struck the match to light your cigar I saw it was the face of the man wanted in Chicago.
When the unidentified policeman is talking to Bob in the doorway of the hardware store, we read the following:
The man in the doorway struck a match and lit his cigar. The light showed a pale, square-jawed face with keen eyes, and a little white scar near his right eyebrow. His scarf pin was a large diamond, oddly set.
This places Jimmy at the hardware store. He not only recognizes his old friend Bob, but also sees Bob has the face of the man wanted in Chicago. Bob would not have recognized Jimmy because he could not have seen beyond the light of the match he was holding. Jimmy would be just as unrecognizable with the matchlight as he was in the darkness.