In these chapters, Tom takes Jim being held in the shanty on his aunt's property as a chance to live out all of his fantasies that have spawned from his excessive reading of adventure novels. He has read many, many different scenarios of prisoners that had to endure terrible agonies, that in the end had daring escapes and came out triumphant. So, Jim is the perfect chance, as he sees it, to enact some of these scenarios. Huck is the voice of logic through all of these escapades, constantly insisting on the simpler, more logical plan that would help Jim escape pretty easily, but Tom insists.
A couple good quotes can be found at the very beginning of chapter 35. Tom is lamenting the fact that Jim's situation makes it much too easy for him to escape. Tom says that "You got to invent all the difficulties." The first "difficulty" that Tom insists on is a saw to "saw the leg of Jim's bed off, so as to get the chain loose," even though, as Huck points out, they could just lift the bed up. The next is a rope ladder. Huck points out that Jim is in a single-story shanty and so doesn't need it, to which Tom responds,
"He can hide it in his bed, can't he? That's what they all do; and he's got to too."
Next in line is that Jim must keep a journal. Huck points out that Jim can't write, but Tom insists, saying "he can make marks on the shirt, can't he?" because all good prisoners keep journals of their travails.
This type of conversation goes on, and on, and on, all the way through their escape in chapter 40. Tom has got his head in the clouds, dreaming of exciting adventures, all while Jim is sitting there, prisoner, in a miserable situation. I hope that those quotes help; if you haven't read the chapters yet, I recommend them. They are highly entertaining. Good luck!