Not a kids book I don’t think-
A fantasy/SF paperback maybe from the 80s? About a woman who gets dumped off on a semi primitive planet by her hosts. I’m remembering something like it was a traveling party ship? And she gets dumped in some small seaside town? She makes her way to the big city and attempts to earn money to support herself/get off planet by telling fortunes in the town market but is brought up short and taken up by the powerful magician of the town who sees that she has no magic and is faking the fortune telling. Very bad in a place where magic is real.
He is a sarcastic and very self satisfied type.
His brother challenges him for primacy in the family -a magicians duel – that is short circuited by her non magical interference. The brother loses. The jerk/ magician acts like himself some more.
So….
Our heroine (in some sort of snit with the magician) somehow gets on a ship leaving the planet only to find herself stuck with the magician who leaves on the same ship ( in a very self satisfied and sarcastic way, of course) to talk her back.
I think it must be one of (or some of) the novels by Doris Egan about Theodora’s adventures on the planet Ivory. Look on Goodreads for user reviews of an omnibus called The Complete Ivory, which comprises the first three novels. The user reviews match your summary.
It is definitely The gate of Ivory by Doris Egan.
It is one of my favorite books.
Yup, The Gate of Ivory by Doris Egan, the first of 3 Ivory novels. The other two are ‘Two-Bit Heroes’ and ‘Guilt-Edged Ivory’. I got the all-in-one combo ‘The Complete Ivory’ put out by Daw in 2001. Check Amazon for individual novels or the complete set in one volume and look for the best prices.