Where Did Prophet Ibrahim Sacrifice His Son
it is quite possible that both events happened at different times. Sacrifice event could’ve happened earlier near Marwa and then latter proper settlement of the family. Since it was a dream shown to Prophet Abraham (sws) upon which he acted literally therefore, it is quite possible that this happened earlier and then settlement happened later based on true interpretation of dream. But the time gap between these two won’t be too long.