(وَلَقَدْ جِئْنَاهُم بِكِتَابٍ فَصَّلْنَاهُ عَلَىٰ عِلْمٍ) (And We had certainly brought them a Book which We detailed by knowledge): They have no excuse because they received the Book, which is the Holy Quran. (We detailed): Allah (swt) the All-Knowing detailed its rulings; preaches, and stories. The Omniscient has revealed this Holy Book in detail, as Guidance for all mankind.
(هُدًى وَرَحْمَةً لِّقَوْمٍ يُؤْمِنُونَ) (as guidance and mercy to a people who believe): This Book holds Guidance within it. Allah (swt) says:
وَنُنَزِّلُ مِنَ الْقُرْآنِ مَا هُوَ شِفَاءٌ وَرَحْمَةٌ لِّلْمُؤْمِنِينَ ۙ وَلَا يَزِيدُ الظَّالِمِينَ إِلَّا خَسَارًا
(And We send down of the Qur’an that which is healing and mercy for the believers, but it does not increase the wrongdoers except in loss.) (Al-Israa: 82)
Although this Book is healing and mercy, it is at the same time a loss for disbelievers, because the nature of the receiver is different but the action is the same. For example, if a person is feeling cold, he blows into his palms to warm them up, and if he wanted to drink a hot cup of tea, he blows in it as well to cool it down so that he can drink it. The action is the same but the receiver is different. This is why Allah (swt) says:
وَنُنَزِّلُ مِنَ الْقُرْآنِ مَا هُوَ شِفَاءٌ وَرَحْمَةٌ لِّلْمُؤْمِنِينَ ۙ وَلَا يَزِيدُ الظَّالِمِينَ إِلَّا خَسَارًا
(And We send down of the Qur’an that which is healing and mercy for the believers, but it does not increase the wrongdoers except in loss.) (Al-Israa: 82)
And in this Surah, He (swt) says: (And We had certainly brought them a Book which We detailed by knowledge – as guidance and mercy) To whom? (to a people who believe). The people who believe accepted the Directional Guidance, thus both Mercy and Guidance of Support were bestowed upon them. Whereas those who refused guidance have lost because they rejected the Holy Quran and refused to believe in it.