إِذْ قَالَ لَهُمْ شُعَيْبٌ
...
When Shu`ayb said to them,
He is not described as belonging to them because of the meaning that was inherent in the name given to them even though he was their brother by blood.
Some people did not notice this point, so they thought that the dwellers of Al-Aykah were different from the people of Madyan, and claimed that Shu`ayb was sent to two nations; some said that he was sent to three.
أَصْحَابُ الاَْيْكَةِ
(The companions of Al-Aykah) were the people of Shu`ayb.
This was the view of Ishaq bin Bishr.
Someone besides Juwaybir said,
"The dwellers of Al-Aykah and the people of Madyan are one and the same."
And Allah knows best.
Although there is another opinion that they were different nations with two identities, the correct view is that they were one nation, but they are described differently in different places.
Shu`ayb preached to them and commanded them to be fair in their weights and measures, the same as is mentioned in the story of Madyan, which also indicates that they were the same nation.