If the Magi took around 2 years to come to Christ from Iran to Palestine, does that mean that the Holy Family stayed in Bethlehem these 2 years until the angel said to them to go to Egypt?
The Holy Family probably remained in Bethlehem for nearly eighteen months to two years. Although the shepherds spread the news of these glorious events of the Nativity of Christ (Luke 2:17), it appears that Herod only became aware, or perhaps only took it seriously when the wise men arrived and asked him where they could find the new born King of the Jews, so that they may worship Him, "Where is He who has been born King of the Jews?" There is no proof exactly how many Magi (or wise men from the East) actually arrived at Bethlehem. Their place of Origin is also unknown, for they may have come from different countries in the East. They presented the Lord with three gifts, but that does not necessarily mean that there were only three wise men. We know from the Holy Scripture that they arrived after the birth of Christ (Matthew 2) and before Christ was two years of age, since that was the maximum age that the decree of Herod to massacre the children of Bethlehem did not exceed (Matthew 2:16). For this reason, perhaps, St. John the Baptist, being six months older in chronological age than our Lord Jesus Christ was not amongst the massacred children of Bethlehem.