Ask Around!
I have found that RPG literature (handbooks, campaign guides, magazines, etc) has a way of accumulating quickly and subsequently getting stashed as people change interests. It's often pretty easy to get things by simply asking around your personal circles.
I stressed about trying to get books one-by-one as gifts when I first started playing. I mentioned to a family member that I was DM'ing for some friends and he retrieved a large box from his attic with the entire 2nd Edition series of books and stacks of campaigns/content!
This happened for me repeatedly. One of my mother's coworkers married a judge, who happened to have all of the Forgotten Realms campaign settings in his garage. One of my own coworkers was throwing away his "Dungeon" magazines and started passing them to me instead. A customer at work brought me his old dice bag, full of cool d20s he'd collected in college.
In turn, I've passed most of my collection on to others in the local gaming scene. Most of my friends have similar experiences - I know very few people who bought much new from retail outlets. Your best bet may just be mentioning D&D to everyone you meet and seeing what shakes out. :)
Shop local!
D&D is a recognizable brand and their books command a "collectible" premium (read: $$$). Most chain stores are wise to this - our local 2nd & Charles always has used D&D gear at a slightly-less-than-retail price. Even chain thrift stores like Goodwill will keep this stuff in glass cases for substantially more than they charge for most books.
On the other hand, fewer people who have moved on from gaming have kept track of collectible value. Sites like craigslist are great places to throw inquiries about free/cheap guides and local thrift stores or secondhand shops may have a good selection that they're not marking up too much.
Local stores might have gaming groups or meetups as well - these folks likely won't give anything away, but if you'd just like some quick inspiration or need some reference, you might be able to borrow someone else's books for a while. This is a bit of shared point with "Ask Around", I guess!