An author-side guide to ghostwriting: realistic costs by book type, what the contract must say about copyright, credit and AI, and how to vet a writer.