In Chapter XXXIII of The Adventures of Tom Sawyer, Tom explains "ransom" to Huck. But in Chapter II of The Adventures of Huckleberry Finn, Tom has no idea what ransoming is. Is this just Twain forgetting what his character knew? Or perhaps Twain is breaking continuity to be able to include the humor/satire of the ransom discussion?
While I think this is just authorial convenience for the exchanges he wanted the characters to have in each instance, and didn't want to be cheated of the second because he'd already done the first, there is a slight difference which may just let Twain off the plot-hole hook.
The Tom Sawyer exchange is about the noun, ransom.
“No, not always. Hive them in the cave till they raise a ransom.”
“What’s a ransom?”
While the Huck Finn exchange is about the verb ransomed
“Oh, certainly. It’s best. Some authorities think different, but mostly it’s considered best to kill them—except some that you bring to the cave here, and keep them till they’re ransomed.”
“Ransomed? What’s that?”
“I don’t know. But that’s what they do."
It's a bit of a stretch to imagine that a boy who reads books about money being raised for ransoms wouldn't realise what the process of 'being ransomed' was, but maybe Twain just liked the idea of boys trying to do crime 'by the book' even when they barely knew what the book meant, and so used the idea twice.