This is a tricky question as you are entering a gray area if you are using material from Book Z to inspire your own book. Derivatives works are highly litigated and there is case law that you could turn to to help you make this decision but based on your example its going to be a fine line. You w...