Jaime is being taken to Kings Landing to be given back to his father. He has a bad dream in which Cersei abandons him and Brienne helps him. Since dreams are meaningful, he wakes up demanding to be taken back to Harrenhal, which he can because he can threaten Steelshanks Walton (who is in charge of getting him to Tywin safely) with telling lies about him to Tywin.
Jaime dramatically saves Brienne from being mauled by a bear as the Bloody Mummers watch, presumably having realised that there is no ransom to be had.
Incidentally, in the dream Jaime says of Aerys's dead grandchildren (Rheagar and Elisia's children): "I never thought he'd hurt them". Who did kill them, and presumably Elisia as well? We don't know yet, do we. And this is the murder that the Dornishmen are so interested in, so are now at Kings Landing. Ser Arthur Dayne, who we just heard about in the previous Arya chapter was in the dream, too.
There is definitely a lot more to learn about how Robert came to be king.