This comes in the storyline after you recruit Perty, but before you reach her room. After defeating Blackhat, return to the library. Read the book, then head south and follow the cat. It'll lead you to a secret room where Perty is trapped in a mirror. She'll be freed in a cutscene. Head to the far north, and follow the path to Perty's room. Gilda will insist on fighting you one-on-one.