The Prophet ﷺ said, "Free the captive, accept the invitation of the one who invites you, and visit the sick."
ى، عن النبي ﷺ قال: فكوا العاني، وأجيبوا الداعي، وعودوا المريض.
Bukhari narrated it in the Book of Marriage (5174) from Musaddad, who said, Yahya narrated to us, from Sufyan, who said, Mansur narrated to me, from Abu Waail, from Abu Musa, and he related it.There are other hadiths on this subject mentioned in the collections concerning the rights of a Muslim over another Muslim.