Should I cite the original source or a book?
Solution 1:
Your question is important. My answer is that it really depends on the nature of the item you are writing (I know you are writing a thesis, but let's forget about this for a while).
If you are writing a book, then you should try to cite the original source. Although really old papers are hardly accessible in an easy way, the author of a book should always point out to the reader who proved an important result for the first time, and possibly where the reader can read the first proof.
If you are writing a research paper, then a recent textbook where statements and proofs in contemporary language can be found is more helpful than old-fashioned manuscripts. Accessibility is really important to those who study a new research paper, and if you cite a book from 1902 that nobody will ever manage to read, then you will be criticized.
My opinion is that a thesis (master thesis? Ph.D. thesis?) is closer to a book than to a research paper, and my advice to you is to cite the original sources as much as you can. This is just my humble opinion, anyway.
Solution 2:
If you are citing because the book added information that is pertinent to your reference that wasn't in the original paper, cite the book.
If you are 100% sure that a) that's not the case and b) the source you think is the original is actually the original one, then you are OK with citing the original source.
In general, I'd say the former is preferable as it's always OK, while the second is a bit "more risky" because of the two preconditions.
Solution 3:
If the book you want to cite is by the same author, then cite the book (it's common that decades worth of work on a particular field gets condensed into a book form). The same goes if the author wrote a review paper: it's more helpful to the reader, if you cite a source that touches the wider subject. No sense of citing 20 old papers if you can cite a more modern reformulation that probably also cleaned up notation and replaced clumsy derivation with more elegant solutions.
If the book is by someone else, it depends on the context. If you are specifically referring to the original research (in the sense of describing the exact circumstances, or maybe referring to the history of discovery or the original author's involvement), then cite the paper (and possibly the book as well, no harm in including an additional source for readers who want to know more). If you are referring to the general topic mentioned in the article/book, then just include the book.