This question affects only the spelling of the Qur’an, not the reading, which in both cases is ʼaṣḥābu l-mašʼamati. In modern Arabic orthography you write this as أَصْحابُ الْمَشْأَمَةِ , but in the older orthography you do not write either the second alif in the first word, or the second alif in the second word, so you get أَصۡحَـٰبُ ٱلۡمَشۡـَٔمَةِ .The long vowel in the first word and the hamza in the second are not indicated in the rasm, but only by diacritics.
PS. In the last word the fatha should be above the hamza, not below it. For some reason this does not show properly with the SE font. I hope you understand what I am trying to convey. والله اعلم