Asalaamulaikum

الجواب وبالله التوفيق
On the condition that the details provided in your question are accurate, as per the situation described in your question, upon this statement of the woman that it is easy for you to leave me just by stating three words, the statement of the husband in response to tell the words that “givetalaq, give talaq, give talaq“, doing this the talaq(divorce) doesn’t take effect because doing so it’s just the husband telling that those were the words.
The answer given by the Imam of your Masjid is correct, the Nikahis still valid.
(کذا فی کتب الفتاوٰی)
واللہاعلم بالصواب
