The Messenger of Allah ﷺ said, "Whatever two people exchange when insulting one another falls upon the one who started it, so long as the wronged party does not exceed the bounds."
حدثنا إسماعيل قال حدثنا روح بن القاسم عن العلاء بن عبد الرحمن بن يعقوب عن أبيه
قال رسول الله ﷺ المستبان ما قالا فعلى البادئ ما لم يعتد المظلوم
Its isnad is sahih, Muslim narrated it, 4/2000, no. 2587, in the chapter on righteousness, prohibition of cursing, as did Abu Dawud, 4/274, no. 4894, and Tirmidhi, 4/352, no. 1981, and he graded it hasan.