My daughter is a junior in college - she is responsible for paying for her own books - so you can be sure that she spends the time to shop around to get the best deals!!
She primarily uses
Amazon, Chegg, and her own college bookstore.
She is a science major so the books differ greatly from year to year - as others have said check those ISBN numbers carefully.
Her basic rule of thumb is to purchase books in her major, and rent (or sometimes buy and sell back) books outside of her major. Chegg is very easy to rent from and provides a return shipping label.
Many times technical books (science, math, finance, etc) come with workbooks and guides - these are often not included when buying from Amazon, etc. So, check carefully and in many cases it turns out to be cheaper to purchase 'the package' from the bookstore.
Most college bookstores have gotten wise to the fact that students purchase their textbooks elsewhere - and only buy back those texts purchased from the bookstore. In some cases it may be more advantageous to buy from the bookstore if you intend to sell them back.
It does take some legwork, but it is worth the effort.
Also, in regards to Amazon prime membership ...
After the initial 'free' year, student prime costs $39/yr. Student prime only comes with membership for one person and the only benefit is 2 day shipping.
However, we found out after wasting money last year on it - it was better for my husband to buy a regular prime membership for $79/yr. It allows him to invite 3 others to share the prime membership - so my daughter and I get free 2-day prime, and we all get access to prime eligible free video streaming (and e-reader books) - something that my daughter loves up at school. For us it was worth it since we were able to get rid of Netflix.