This problem will lead us to a system of simultaneous equations.
Let x represent hardcover books,
Let y represent paperback books,
Therefore, we have:

We will solve via the elimination method.

Having solved for x, we substitute this value of x into equation q to get y as:

x = 6,
y = 6