The Courageous Princess book 3. Spoilers ahead for the first two.
Because it opens with Mabelrose the prisoner of her aunt, in the castle as Ursula finishes her preparations to conquer the world -- she will never have enough -- and her father and his companions and her companions from earlier hearing of how dangerous it is to escape the land they were imprisoned in.
Mabelrose wanders about and does this and that. Her aunt subjects her to lessons because her niece ought to be a proper princess. Her father and the rest try to escape. It involves accidental mentions, the library, music, the breaking of spells, a flying carpet, and more.