If I were going to write an essay on just these chapters, I think I would focus on how the theme of conscience is depicted in the events of these chapters. You can read about the three main themes here on enotes (see the link below). Chapter 17 is the chapter in which Huck meets the Grangerfords. As he often does when he pops back into society, Huck starts lying, making up false identites. He is now George Jackson. The Grangerfords take him in and feed him. They are involved in a decades long blood fued with the Shepherdson family. Huck doesn't understand feuds, so the young boy Buck explains it to Huck. Later, one of the Grangerford girls runs off with one of the Shepherdson young men and Buck and another Grangerford are killed. Huck is shocked and confused when he comes upon the dead bodies. Luckily, at that point, Jim appears (this is chapter 19 now), and rescues him and Huck then retreats to the raft, and safety.
Whenver Huck is on the raft with Jim, he becomes an innocent again. He struggles with his conscience over hiding Jim, but he senses in his heart that this is the right thing to do. Whenever he is in society, he comes upon things that are totally twisted and confusing - like the feud. While he is with the Grangerfords (in their "society") he accepts the feud as just another reality, but when he gets back onto the raft, he struggles with the immorality of it all. He tells Jim that "one is mighty free and easy and comfortable on a raft.”
Later in chapter 19, Jim and Huck get close to society again and they come upon the Duke and Dauphin. Again, these two con artists are representative of the twisted morality that Twain is trying to satirize in the novel. The two innocents, Huck and Jim, try to help them out but they soon realize what they are dealing with. Through many other chapters, their misadventures with these two crooks expose other examples of hypocrisy, but in the end, Huck and Jim escape. Back on the raft, Huck is able to process it all, concluding that the Duke and Dauphin were, indeed crooks, and yet he feels sorry for them because, in the end, they are so pitiful.