It seems to me that by using the word "should" in your question you are asking, not what would you do, but what should you do if you were in Jimmy's position. It seems to me that, as much as I feel sorry for his friend "Silky" Bob, I think Jimmy did exactly what he should have done under the circumstances. Jimmy could not bring himself to arrest his old friend personally, but he solved that problem by having him arrested by a plain clothes detective. His note to Bob reads in part as follows:
"Somehow I coulldn't do it myself, so I went around and got a plain clothes man to do the job. JIMMY."
O. Henry probably realized while he was writing the story that there would have to be an unpleasant scene if Jimmy were suddenly to reveal his identity and tell Bob he was under arrest. Naturally Bob would protest and appeal to their old friendship, trying his best to talk Jimmy out of making the arrest. Jimmy would have to appear rather stony-hearted in such a scene, regardless of whether or not he was doing the right thing.
O. Henry may not have had his ending in mind when he started to write this story. But he solved his plot problem beautifully by having Jimmy far removed from the scene of the actual arrest.
In answer to the question, "What should you have done if you were Jimmy?", I would say that you should have done exactly what Jimmy did. If the question were, "What would you have done if you were Jimmy?", I would have to give the same answer, because I would be Jimmy and would act just like Jimmy, a sworn officer of the law doing his duty. His character was already formed when Bob knew him twenty years earlier when, according to Bob, Jimmy was twenty years old. Jimmy is now forty and thoroughly set in his ways.
"But I know Jimmy will meet me here if he's alive, for he always was the truest, stanchest old chap in the world."
Jimmy was truthful and dependable twenty years before, and he proves himself to be true and dependable twenty years after, although his truthfulness and loyalty have inevitably focused in his profession.
If the question were "What would I have done if I were Jimmy?", I would still have to say that if I were Jimmy I would do what he did. But if the question were, "What would I have done if I were just a cop who encountered an old friend who was wanted for questioning by the Chicago police?", I might have told Bob to get lost, although I would feel guilty about it for a long time afterwards.
There is a difference between "should" and "would" and between being Jimmy and being yourself.
O. Henry intentionally makes Bob's troubles seem relatively light because he doesn't want to make Jimmy look too draconian. Bob is not going to be executed or sentenced to life in prison. The plain clothes man who makes the arrest tells him:
"Chicago thinks you may have dropped over our way and wires us she wants to have a chat with you."
Bob may be in for a good grilling, but he is obviously a smooth talker and may be able to talk himself out of his problems with the Chicago police. (After all, they don't call him "Silky" Bob for nothing.) The police need concrete evidence and may have nothing but accusations without proof. The worst that may have happened to Bob may have been that he was disappointed by an old friend.