Commas with Nonrestrictive Modifiers. A modifying word, phrase, or clause following a noun is set off by commas if it presents information which is not essential to identify the noun or the meaning of the sentence. This is called a nonrestrictive modifier, i.e., it does not restrict the meaning of the noun or sentence.
The given quote "maybe the two different worlds we lived in were not so different. We saw the same sunset" can be found on Page 40 in the book "The Outsiders" by S.E. Hinton.
the page number may differ considering the publication and version one is using.