Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:26:40

That we might follow the magicians if they are the predominant?"  

Maybe we will follow the sorcerers, should they be the victors’ (the interrogative ˹of the previous verse˺ is an incitement to assemble and the optative sense ˹implicit in la‘alla˺ is due to their anticipation of victory, and hence their continued adherence to their religion and rejection of Moses).
القرآن:٢٦:٤٠

لَعَلَّنَا نَتَّبِعُ السَّحَرَةَ إِنْ كَانُوا هُمُ الْغَالِبِينَ  

{لعلنا نتبع السحرة إن كانوا هم الغالبين} الاستفهام للحث على الاجتماع والترجي على تقدير غلبتهم ليستمروا على دينهم فلا يتبعوا موسى.