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, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
There is no contradiction in the statement of Ibn Qudaamah in his book Al-Mughni. He said at the beginning, “If he laughs and two letters are articulated, his prayer is invalid, as well as if he laughs boisterously even without the two letters (being articulated).” After that he said, “Ibn Al-Munthir said, ‘The scholars unanimously agreed that laughing invalidates the prayer.’”
The statement of Ibn Al-Munthir is interpreted to mean that the prayer is invalidated by laughter if two letters are articulated. An-Nawawi said, “According to our School (Shaafi‘i), smiling does not affect the validity of the prayer, nor does laughing if less than two letters are articulated; however, if two letters are articulated, the prayer is invalid. Ibn Al-Munthir reported the consensus of the scholars that the prayer becomes invalid by laughing, but this is understood to mean if two letters (or more) are articulated...”
Hence, there is no contradiction between the statement of Ibn Qudaamah and the statement which he attributed to Ibn Al-Munthir at the end.
Allah knows best.