Answer:
I can buy at most 5 hardback books or 12 paperbacks.
Explanation:
Let h be the number of hardback books and p the number of paperbacks.

If I don't buy any paperbacks, I can buy at most 5 hardbacks.
If I don't buy any hardbacks, I can buy at most 12 paperbacks.