"The LORD is far from the wicked" (Proverbs 15:29). Rabbi Aha bar Hanina said: Come and see how much harder the wisdom of Solomon is than the wisdom of his father. David said (Psalms 145:18): "The LORD is near to all who call upon Him, to all who call upon Him in truth," while Solomon said "The LORD is far from the wicked" (Proverbs 15:29) - these are the ones who do not repent at all. "But the prayer of the righteous He hears" (Proverbs 15:29) - at the hour when they pray together with the congregation.
The LORD Is Far From the Wicked Who Will Not Repent
Midrash Mishlei 15:4
(משלי טו כט): "רחוק ה' מרשעים" - אמר רבי אחא בר חנינא: בוא וראה כמה קשה חכמתו של שלמה יותר מחכמתו של אביו: דוד אמר (תהלים קמה יח): "קרוב ה' לכל קוראיו לכל אשר יקראוהו באמת", ושלמה אמר "רחוק ה' מרשעים" - אלו שאין עושים תשובה כל עיקר, "ותפילת צדיקים ישמע" - בשעה שמתפללין עם הציבור.