Why would it not be legal to enforce a contract after 9 years? If she didn't want it enforced after a duration, she could have negotiated for that, or just not signed it.
I don't see how it's principled to legally swear to not do something, then turn around and do it anyways. She's an adult, she has agency, and she chose to enter that contract.
It's also not like we're talking about a legal whistleblower here. That act DOES (and should) have a lot of legal protections. This is someone writing a book that they personally profit from.