Complex sentence: Sansa is elated to be rid of Joffrey, but Baelish warns her that she is still in danger while she is in King's Landing, and offers to scheme to see her home safely.
Split into simpler sentences: Sansa is elated to be rid of Joffrey, but Baelish warns her that she is still in danger while she is in King's Landing. He offers to scheme to see her home safely.