Wa `alaykum As-salamu wa rahmatullahi wa barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear questioner, thanks a lot for your question and your apparent fear of contradicting Allah’s laws. May Allah enlighten our hearts with the light of Islam!
There is nothing wrong if a person performs Sa`i (walking seven times back and forth between the rocky hillocks of Safa and Marwah) before Tawaf (the seven-circuit circumambulation of the Ka`bah while reciting prayers) due to ignorance.
In this regard, Sheikh `Abdul-`Aziz ibn Baz, the late Mufti of Saudi Arabia, stated:
The Sunnah is to perform Tawaf first, then to perform Sa`i. There is nothing wrong if a person performs Sa`i before Tawaf due to ignorance. It is reported that a man asked the Prophet and said: "I performed Sa`i before Tawaf. So what should I do?" The Prophet (peace and blessings be upon him) said, "Do it and there is no harm." This indicates that if a person performs Sa`i before Tawaf, his Hajj is still valid.
Allah Almighty knows best.