وَإِن كَانَ أَصْحَٰبُ ٱلْأَيْكَةِ لَظَٰلِمِينَ · فَٱنتَقَمْنَا مِنْهُمْ وَإِنَّهُمَا لَبِإِمَامٍ مُّبِينٍ
"The people of al-Ayka too were wrongdoers. · So We took retribution from them. Both are on a plain road."
The word occurred at Qāf 50/13-14 within a list of destructions and was treated there. I rely on that treatment.
Whether this community is the same as the people of Midian is debated in the classical commentaries. I do not enter this debate and fix no geographical location; the verse gives no place name, it gives an attribute: la-ẓālimīn.
The pronoun is dual: innahumā — "the two of them." That is, the homeland of the people of Lot and al-Ayka.
إِمَام — root أ-م-م: to go in front, the direction intended. Imām — the one in front, the one followed; and an open, travelled road.
The word was treated at al-Qaṣaṣ 28/5 and 28/41, and also at al-Furqān 25/74, where it was set out in a table that the same word is used in two opposite directions. I rely on those treatments.
The same idea, with two different words. I record this as an observation about the word order: the sūra emphasises the visibility of the remains twice, with two different words.