Assalaamu alaykum. There is a hadith that says that Prophet Muhammad, sallallaahu ‘alayhi wa sallam, killed a Muslim as punishment for killing a Mu'aahid (a person who is granted the pledge of protection by the Muslims) and said that he was to fulfill the covenant. So my question is: can a Muslim be killed as punishment for killing an innocent non-Muslim?
All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
The hadeeth mentioned in the question is inauthentic, as it was classified by Al-Albaani .
As for killing an innocent non-Muslim, it is a grave sin and a serious misdeed. The Prophet, sallallahu ‘alayhi wa sallam, said, "Whoever kills a Mu‘aahad shall not smell the fragrance of Paradise..." [Al-Bukhari]
As for killing the Muslim in retaliation for the murder of a non-Muslim, the scholars held different views in this regard. Abu Haneefah maintained that a Muslim may be killed in retaliation for killing a non-Muslim. However, the majority of the scholars held that a Muslim is not to be killed in retaliation for killing a non-Muslim based on the authentic hadeeth to this effect; the Prophet, sallallahu ‘alayhi wa sallam, said, "A Muslim is not to be killed for the murder of a non-Muslim." [Al-Bukhari]
However, although the Muslim is not to be killed in retaliation for the murder of a non-Muslim according to the view of the majority of the scholars, he bears a very serious sin and is subject to the stern warnings in this regard. The Muslim ruler has the right to subject him to any discretionary punishment fitting the gravity and extent of the crime.
Allah knows best.
You can search for fatwa through many choices