An awkward sentence.
What you are most likely to hear is "With some books badly needing to be bought, she hurried to the bookstore." - but this is not one of the options offered.
In good English, the sentence could be " Needing some books badly, she hurried to the bookstore to buy them", or indeed your suggested sentence.
Of the options offered, the one I would go for is "buying": "With some books badly needed buying ,she hurried to the bookstore."
Student or Learner