Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:31:3

As guidance and mercy for the doers of good  

it is, a guidance and a mercy (read nominative rahmatun; the popular accusative reading ˹rahmatan˺ would make it a circumstantial qualifier referring to āyāt, ‘signs’, the operator of which being the implicit demonstrative import of tilka, ‘those’) for the virtuous,
القرآن:٣١:٣

هُدًى وَرَحْمَةً لِلْمُحْسِنِينَ  

هو (هدى ورحمة) بالرفع (للمحسنين) وفي قراءة العامة بالنصب حالاً من الآيات العامل فيها ما في "تلك" من معنى الإشارة.

See similar narrations below:

Collected by Qurʾān
quran:27:77

And indeed, it is guidance and mercy for the believers.  

And truly it is a guidance, from error, and a mercy for believers, from chastisement.
القرآن:٢٧:٧٧

وَإِنَّهُ لَهُدًى وَرَحْمَةٌ لِلْمُؤْمِنِينَ  

{وإنه لهدى} من الضلالة {ورحمة للمؤمنين} من العذاب.