Can a Priest or Pastor exorcise a Muslim by invoking the name of Jesus or an Immam exorcise a Christian by invoking the name of Mohamed?

Yes, a Christian Priest can exorcise any person or place. The subject need not be Christian but to assist the exorcism he/she should prepare themselves with prayer, confession and if they are able with communion. With the exception of communion there is nothing here that a Muslim couldn't do and the main requirement of the subject is to accept totally God's will.

The purpose of the exorcism is to command evil entity in the name of God or the Lord Jesus Christ to leave the possessed and here there would be a conflict of faith as Muslims do not accept Christ as divine though I would argue that if the subject was still willing to undergo the exorcism it would still succeed as places (which require no participation in the act)can be exorcised.

An Imam however, could not undertake any form of exorcism of a true Christian for two reasons:

1. A Christian even barely aware of what is happening could not accept the name of Mohammed above Jesus Christ Son of God.

2. Mohammed was a prophet - Muslims do not regard him as divine so invoking his name would have no effect.

The essential process with possession/exorcism is that spirits have to respond to the commands of a higher authority - hence the command has to be in the name of the Lord Jesus Christ Son of God.

From the point of view of Islamic practice and theology: Muslim exorcisms consist basically of Quran recitation, and they are nor performed in the name of the Prophet, as he does not occupy the place in Islamic cosmology that Jesus Christ occupies in Christian cosmology. The Quran is considered by Muslim theology as revelation from the one God of Adam, Abraham and Jesus, and its utterance would therefore have an effect on any soul regardless of its ideas about it. In Egypt at least, as far as I know, there are records of successful exorcisms of Christians by Muslim experts (not necessarily Imams, as there is no priesthood in Islam). It should be kept in mind that the power of the exorcism, because it deals with subtle non-corporeal entities, is not mainly a matter of doctrinal beliefs but of incantation in the best sense, with rhythm and articulation playing a prominent part, which is why Christian exorcisms are performed in Latin or Greek, perhaps also Coptic or Ethiopian or Arabic, as the Islamic ones are carried out in Arabic. And God knows best.