let x = number of paperbacks purchased
dx + 2d(5-x) = 7d
x + 2(5-x) = 7
solve for x
All paperback books cost d dollars each and all hardback books cost 2d dollars each. If Kate paid 7d dollars for 5 books, how many paperback books did she buy?
I'm having trouble setting up an equation to solve this. I know the answer should be 3.