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 is His slave and Messenger.
There must be an Imam in each mosque to perform the Friday prayer. In other words, the same Imaam is not allowed to perform the Friday prayer the same day in more than one mosque, since we find no evidence in the Sharee’ah that legalizes such an action.
Although the Shaafi'i School of jurisprudence legalizes the imamate of the person who performs supererogatory prayer to lead the Friday prayer, they do not mention anything concerning repeating the Khutbah (sermon) on Friday, nor repeating the Friday prayer intentionally, since they do not legalize conducting more than one Friday prayer in the same town (area).
For sure, we know that if the Muslim Daa’iyah (caller to Islam), who works inside the prison, performs the Friday prayer for the second time, it will be a supererogatory prayer on his part.
As a result, we do not advise repeating the Friday prayer and Khutbah. But, if the prison inmates want to perform the Friday prayer they can do so, and one of them will be their leader in Khutbah and sermon.
For more benefit on attending a second Jumu’ah in the same mosque, or holding two Friday prayers in the same city, please refer to Fataawa 96945, 83662, 257203, 90374, 306409, and 393406.
For more benefit on the conditions for Friday prayer, please refer to Fataawa 82835, 82979, 356992, 117037, and 257203.
Allah knows best.