The most popular school of Hindu philosophy is the Vedanta school, which bases its tenets on the doctrines laid out in the Brahma Sutras, a work by Vyasa which summarizes and systematizes the philosophical teachings of the Upanishads. You can read the Brahma Sutras here; they consist of concise sayings that people often consider hard to understand without a commentary. In any case, near the end of the Adhyaya 2 Pada 3 of the Brahma Sutras, Vyasa says this:
(The individual souls are) parts of God because of the mention that they are different, also because some read otherwise of (Brahman’s) identity with fishermen, slaves, gamblers and others.
This follows from the words of the mantras also.
And this is also stated in the Smriti (Gita).
My question is about Sutra 45, which refers to the Bhagavad Gita. Note that the parenthetical mention of "Gita" was added by the translator; the Sanskrit just says "api smaryate" or "thus it is stated in the Smriti". (The Bhagavad Gita is a part of the Mahabharata, which is a Smriti text.) In any case, that Sutra is clearly referring to this verse of the Bhagavad Gita:
The living entities in this conditioned world are My eternal fragmental parts. Due to conditioned life, they are struggling very hard with the six senses, which include the mind.
This is confirmed in both Adi Shankaracharya's commentary the Brahmasutra Bhashya and in Ramanujacharya's commentary the Sri Bhashya. So this suggests that the Bhagavad Gita is older than the Brahma Sutra Bhashya. Now here is where things get weird. In another chapter of the Bhagavad Gita, Krishna says this:
That knowledge of the field of activities and of the knower of activities is described by various sages in various Vedic writings. It is especially presented in Vedānta-sūtra with all reasoning as to cause and effect.
Note that the translator says "Vedanta-Sutras", an alternate name for the Brahma Sutras, but in any case the Sanskrit says "Brahma Sutras". So to sum up, the Brahma Sutras refer to Bhagavad Gita, a text that refers back to the Brahma Sutras!
My question is, how is it possible for these two texts to have references to each other? Which text came first? Could it be that one or both of these references are interpolations? This web pages argues that they're not:
It might be argued that at least one text has had spurious insertions made into it to apparently refer to the other[.]... However, it is not found that the various rescensions of the Brahma-sUtra are different, with some not having the questionable references; all copies of the Brahma-sUtra as obtained from a variety of sources carry them. Moreover, considering the flow of the discourse in the Bhagavad-Gita and the Brahma-sUtra, it seems very unlikely that the references are spurious insertions; they fit in well with the general background of the discussion, and do not stand out as later insertions presumably would.
Here is webpage's alternate explanation:
[T]he same author could very well have written both works in any order; he could add a reference to an as-yet-unwritten text, knowing that he was going to write it, and also knowing what he was going to write in it.
There's one problem with this explanation though: Vyasa may have composed the Mahabharata as a whole, but Bhagavad Gita constitutes the words of Krishna himself on the battlefield of Kurukshetra. The Bhagavad Gita is part of the 8800-verse core of the Mahabharata Known as the Jaya, and as I discuss in this answer the Jaya is a record of Sanjaya's narration of the Mahabharata war to Dhritarashtra. So Vyasa did not insert any content into the Bhagavad Gita, and thus this wouldn't explain things if the Bhagavad Gita came after the Brahma Sutras
Could it be that Vyasa, being a Trikalanyani, knew what Krishna was going to say in the battlefield of Kurukshetra, or could it be that the Mahabharata war had already happened by the time of the composition of the Brahma Sutras, but Vyasa hadn't finalized the Mahabharata yet?