The story that you are asking about is "The Ransom of Red Chief" by O. Henry. Red Chief's real name is Johnny Dorset, and Bill and Sam have kidnapped him for ransom money. Unfortunately for Bill and Sam, it's more like little Johnny is holding them hostage. The reader learns early on that Johnny is not likely to try and escape the cave and his captors, because Johnny thinks that he is having a grand old adventure with the two bumbling criminals.
Yes, sir, that boy seemed to be having the time of his life. The fun of camping out in a cave had made him forget that he was a captive himself.
About a page after the above quote, Sam flat out asks Johnny if he would like to go home. The following is Johnny's response.
“Aw, what for?” says he. “I don’t have any fun at home. I hate to go to school. I like to camp out. You won’t take me back home again, Snake-eye, will you?”
Johnny is practically begging his kidnappers to keep him kidnapped, because he is having more fun than he does at home. He gets to camp in a cave, play cowboy and Indian games, and terrorize two men that have to put up with his antics. Johnny is having the time of his life, so Bill and Sam are quite certain that he will not try to escape.