"And they remained in their cave three hundred," then He explained what those three hundred are, so He said: "years."
Muhammad said: "Years" is an appositive (ʿaṭf) to "three hundred"; the grammarians call this type of apposition: the apposition of explanation (ʿaṭf al-bayān) and confirmation (al-tawkīd).
His saying: "And they added nine," meaning: nine years. Qatada's interpretation: He said: This is the statement of the People of the Book, returning to the beginning of the discourse: "They will say: Three, the fourth of them is their dog; and they say: Five, the sixth of them is their dog, guessing at the unseen; and they say: Seven, and the eighth of them is their dog." And they say: "They remained in their cave three hundred years, and added nine."
﴿وَلَبِثُوا فِي كهفهم ثَلَاثمِائَة﴾ ثمَّ أخبر مَا تِلْكَ الثلاثمائة، فَقَالَ: ﴿سِنِين﴾.
قَالَ مُحَمَّد: (سِنِين) عطف على ثَلَاثمِائَة؛ وَهَذَا الْعَطْفُ يُسَمِّيهِ النَّحَوِيُّونَ: عَطْفُ الْبَيَانِ وَالتَّوْكِيدُ.
قَوْلُهُ: ﴿وَازْدَادُوا تِسْعًا﴾ أَيْ: تِسْعَ سِنِينَ. تَفْسِيرُ قَتَادَةَ: قَالَ: هَذَا قَوْلُ أَهْلُ الْكِتَابِ، رَجْعٌ إِلَى أَوَّلِ الْكَلَامِ ﴿سَيَقُولُونَ ثَلاثَةٌ رَابِعُهُمْ كَلْبُهُمْ وَيَقُولُونَ خَمْسَةٌ سَادِسُهُمْ كَلْبُهُمْ رَجْمًا بِالْغَيْبِ وَيَقُولُونَ سَبْعَة وثامنهم كلبهم﴾ وَيَقُولُونَ: ﴿لَبِثُوا فِي كهفهم ثَلَاثمِائَة سِنِين، وازدادوا تسعا﴾.