Words like «ja», «doch» used as in these example sentences are called modal particles. They serve a double function:
- First, German modal particles add a nuance to the meaning of the entire sentence, reflecting “the mood or the attitude of the speaker or the narrator”. (Very roughly speaking, the modal particle «ja» adds a notion that what the sentence says is commonly known, and the modal particle «doch» adds a notion that what the sentence says is unexpected – their combination thus means something like “it is unexpected, but everybody knows it”.)
- Second, the positioning of German modal particles is a means of highlighting a sentence’s focus: the focus normally is on the constituent that follows them.
It is this second function of focus highlighting that differentiates the two sentences. In the first sentence, the modal particles highlight the constituent «zwei Cellisten» as focused:
- weil ja doch zwei Cellisten in diesem Hotel abgestiegen sind
In English, there are no focus highlighting words. Instead, the focus could be expressed by stress. So sentence (1) with its focus on the cellists could be translated to as follows:
- because TWO CELLISTS have lodged in this hotel
In the second sentence, the modal particles highlight the constituent «in diesem Hotel» as focused:
- weil zwei Cellisten ja doch in diesem Hotel abgestiegen sind
Using stress for hightlighting the focus in English, this could be translated as follows:
- because two cellists have lodged IN THIS HOTEL
Basically, the explanation in the book you are reading is correct, if a bit obscure. The focused constituent is the one that “contributes new, non-derivable, or contrastive information” (as the Wikipedia article focus says). The non-focused constituents, by comparison, are previously known.
Addendum: There is a third position where the «ja doch» can be placed, that is, before the verb. This placement will highlight the verb as focused:
- weil zwei Cellisten in diesem Hotel ja doch abgestiegen sind
Again, using stress for hightlighting the focus in English, this could be translated as follows:
- because two cellists HAVE LODGED in this hotel