You're told that there are 27 books total and 9 of them are nonfiction. That means 27-9 = 18 books are fiction.
The ratio of fiction to nonfiction is 18 fiction to 9 nonfiction = 2 fiction to 1 nonfiction. That means for every nonfiction book, there are two fiction books.
If 6 new fiction books are added, you will have 18+6 = 24 fiction books. To keep that 2 fiction to 1 nonfiction ratio, that means you should have 24/2 = 12 nonfiction books.
You currently have 9 nonfiction books displayed, so 3 more nonfiction books should be added to display a total number of 12 nonfiction books.