Theory:

     There was time. He was young enough. He would find his old purpose in life, and follow it. That sweet music had changed him. Tomorrow he would find work. A man had once offered him a job. He would find that man tomorrow. He would be somebody in the world. He would. Soapy felt a hand on his arm. He looked quickly around into the broad face of a cop.

     “What are you doing hanging around here?” asked the cop.

     “Nothing,” said Soapy.

     “You think I believe that?” said the cop.

     Full of his new strength, Soapy began to argue. And it is not wise to argue with a New York cop.

     “Come along,” said the cop.

     “Three months prison on Blackwell’s Island,” said the judge to Soapy next morning.
Explanation:
 
Soapy thought that there was enough time for him to change himself. After all, he was a young man and he had many ways to change his life. He thought to himself that the next morning he would find a new job. At that moment while thinking about the job, Soapy remembered a man who offered him a job once. He thought of meeting the man the next day. Then, he thought that if the man gives him the job, he will become somebody in the world. The world seemed very big with lots of people. Among them, he had to find the man for his job. While he was thinking about a new life, Soapy felt a hand on his arm. Soapy turned back and saw the broad face of a cop.
 
The cop asked him what he was doing here in the night time and Soapy said that it was "nothing". The cop asked whether he needs to believe what he said. On hearing that, Soapy started to argue with him with full of new strength. But it was not good to argue with a New York cop. Finally, the cop arrested him. The cop would have arrested Soapy without proper investigation because he believed that Soapy was doing something wrong. Or it could also be because Soapy had argued with him.
 
shutterstock_1420145456 (1).svg
The cop arrested Soapy for arguing with him
 
The next morning Soapy was sent before the judge. The judge sentenced him to “Three months prison on Blackwell’s Island”. The writer ends the story in Irony. When Soapy thought of going to jail, his destiny did not help him. When he yearned to lead a good life, the life had made him to fall down and sent him to prison. This is what life is. What we expect would not happen and what we did not expect would happen. O. Henry had concluded the story with an unexpected and twisted ending.
 
shutterstock_1932891689 (1).svg
The judge gave the judgement as three months of prison on Blackwell's Island
 
Meanings of the difficult words:
 
S.NoWords
Meanings
1
StrengthThe quality or state of being physically strong
2
ArgueExchange or express diverging or opposite views, typically in a heated or angry way
3
IronyA event that seemed to be deliberately contrary to what one expected and give a surprised or twisted result
Reference:
National Council of Educational Research and Training (2007). An Alien Hand. The Cop and the Anthem- O. Henry(20-29). Published at the Publication Division by the Secretary, National Council of Educational Research and Training, Sri Aurobindo Marg, New Delhi.