In Java Edition Minecraft, you can use an anvil to combine an enchanted book with a tool, granting it that enchantment. However, if you want to apply a second book, the cost will increase, and so on with more books. To reduce the effect of this cost increase, you can combine books with other books for a smaller experience cost, and when applied to the tool, it will only cost the amount that one book would.
The question is, then, what's the most efficient way of combining books with tools to minimize experience cost?