Although the library might be the last place you'll find yourself in, you might want to reconsider. Not only is it a great place to study, but it's also a great place to find books (obviously). Specifically, you can find some of the textbooks you actually need right in your library. I bet you didn't know that. Besides books, some campuses have subscriptions to thousands of scholarly journals accessible to students who want to do research. If you're fortunate to be at a research institution, you shouldn't let these research documents pass you by, because seriously, you're paying for it with your tuition. Because these subscriptions don't come free, the school spends millions on them each year with your money.
So stop being so cool, and take a stroll at your schools library, you might be suprised, but there are a lot of books at your disposal. It doesn't even have to be school books, you could even check out your favorite Harry Potter book. Anyway, enough with formalities, let's get down to business.
What to do:
I made the video below about an year ago, so it might be out of date.
Food For Thought
You shouldn't put a price on your education. Make sure to consider whether buying the actual textbook will be useful for you. I know a lot of friend who love to sell their textbook RIGHT after the class ends. I can understand if the class isn't in their major, but if you're selling books back that are important for your major, you might be doing a disservice to yourself.
You may not realize, but the textbooks in your upper division and even some lower division can one day be reference material for you at a job. One day you might be sitting at work and realize you've got a complicated engineering problem in front of you. Then you might be rethinking if reselling your book was worth the complications at work.