When was the sermon of the Jumu'ah prayer given in the time of the Prophet (s)? Was it before or after the prayers? Did Muawiya have a role in changing this practice afterwards?
Sermon of Jum'ah was always given by the Prophet Muhammad (SAWA) before the two Rak'ats of Jum'ah Prayer.
Mo'awiyah and Uthman before him tried changing it.
In the well known Sunni book Morooj Al-Thahab مروج الذهب (2:72) that Mo'awiyah prayed Jum'ah prayer on Wednesday when he returned from Siffeen.
Wassalam.