Holy ambiguity, Batman. We're not really sure what's going to happen to either Hahp or Sadima at the end of the book.
In Hahp's case, he's still stuck in the academy with the wizards trying to weed out the boys through starvation, sleep deprivation, and psychological torture. But something has changed: he and Gerrard have (quietly) made a pact to work together to beat the wizards at their own game, so that one of them, at least, can get revenge. Even though Hahp's still not allowed to eat because he's in the process of memorizing the song Somiss wants him to, Gerrard feeds him a meal.
Gerrard also helps Hahp study the book of songs, which Hahp is convinced he never could've managed on his own:
By the third time I could feel myself learning it in a way that reading is silently, stumbling over the words, I never could have managed. On the tenth time, he stopped reading after the first few words, and I recited it, alone.
I reached out and gripped his arm for an instant, then sat back on my cot to practice silently. It had been so long since my thoughts were thoughts, not screams. I was still scared, but somehow the knives had gone out of it. (64.25-26)
So things are looking up for Hahp, if only barely.
Sadima flees Limòri with Franklin and Somiss after someone sets fire to their house. They wind up going to the underground tunnels, which Somiss believes are the ancient home of magic. Oh, and Somiss is also keeping beggar boys captive in there, and we don't think it's part of an educational program to keep kids off the streets.
Somiss is being his usual not-giving-a-crap-about-anyone-but-himself self, so when their carriage overturns, it's up to Sadima to find where Franklin's been tossed and ask him, "Where are you hurt? Can you sit up?" (65.8). Luckily Franklin's not hurt; none of them really are… yet, anyway.
We say yet because Somiss is acting kinda strange: "Somiss carried all the sheet-bundles, and he was laughing, his eyes as wide as a child's as they started down the path" (65.13). Has he finally gone crazy, breaking under the strain of too much power and ambition? It's unclear. So like Hahp at the end of the book, Sadima's also in a bad situation, though at least by now she's resolved that she does care about Franklin and is looking for a way to take Somiss out if he becomes too power-mad.