B has 7 more books than A, so add the extra to A's total.

• A's books = 18
• Extra that B has = 7
• B's books = 18 + 7 = 25

Final Answer: 25