A simple answer is that B is correct.
For more details:
- A: "pays" can take a preposition "for" in this context.
- B: "provides" can take a preposition "for" in this context.
- C: "affords" cannot take the preposition "for" in this context.
A, without the use of "for", would imply that the school gives money gives money to either the textbooks or the students (whichever "them" refers to). Giving money to the textbooks would of course be silly, and the students not having to pay because they themselves are paid does not make sense.
B would arguably be more grammatically correct with "for", but works fine without.
In the literal sense, C would mean that the school gives either the textbooks or the students the capacity to do something (but the sentence would be incomplete). If the sentence were to be completed it could say "the school affords students the ability to take textbooks off of former students". Alternatively it could be written as "Students don't have to pay ... as the school can afford them".
As such, while you could technically answer A (as it might imply that the school provides funds to the students to obtain books), it would certainly be an awkward interpretation. B is correct, and the implication in the context is that the school gives them without any charge: but it does not explicitly state this.