Matthew 2:11-15
Mat 2:11 (KJB)
And when they were come into the house, they saw the young child with Mary his mother, and fell down, and worshipped him: and when they had opened their treasures, they presented unto him gifts; gold, and frankincense, and myrrh.
They were no longer in the stable as they had now moved into a house plus this point in time was about two years after the birth, so Jesus was now a young child. It is possible that the Magi saw the star when Jesus was born and it took them this length of time to find Him. Then when they came into the house, they knew that their journey was successful. When they saw Him, they fell down before Him and worshipped Him. Then they had presented the gifts that they brought for Him. Their journey was definitely guided by God. Not only did they find the Lord Jesus but the gifts they brought for Him all had prophetic meaning. The gold they brought was representative of an offering for a King. Frankincense is also known as Olibanum and is a pungent, bitter yellow gum resin from the Boswellia tree. It is also said that the Frankincense tree grows in unforgiving environment and even been known to grow directly out of a rock. It is interesting that Jesus grew up in an unforgiving environment which eventually sent Him to the cross. Frankincense was an incense which was used in the temple service. (Exo 30:34 KJV) And the LORD said unto Moses, Take unto thee sweet spices, stacte, and onycha, and galbanum; these sweet spices with pure frankincense: of each shall there be a like weight: Frankincense was also very rare and has sometimes brought prices equal to the value of gold. Myrrh comes from the Aramaic word “murr” which means bitter. It was used by the ancient Egyptians to embalm the dead. Myrrh was given to the Lord Jesus as a prophetic symbol of His death 30 years later.
Mat 2:12 (KJB)
And being warned of God in a dream that they should not return to Herod, they departed into their own country another way.
Their trip was successful and they were probably getting ready to return to Herod and give him the information as to where the location of the Lord Jesus Christ was. God had then warned them in a dream that they should not return to Herod because they did not know that they had been deceived by him but God knew and because of this warning, they had returned to their own country by another route. They had to avoid Herod at all costs, because if they were caught deceiving the king, they would be brought back to Herod and all of them would probably be executed. God had guided the wise men from their homes and He is now guiding them safely back.
Mat 2:13 (KJB)
And when they were departed, behold, the angel of the Lord appeareth to Joseph in a dream, saying, Arise, and take the young child and his mother, and flee into Egypt, and be thou there until I bring thee word: for Herod will seek the young child to destroy him.
Once the wise men were safely on their way home, the next one to be warned of Herod’s deception and plans was Joseph. Then the angel of the Lord came to Joseph in a dream and commands him to take young Jesus and Mary and go into Egypt. They were to remain there until God brings them word that it is safe for them to go back. The angel reveals to Joseph that Herod desires to destroy the child because Herod was a murderer and he did not care if he killed a child, as along as his throne was safe. Joseph must have been a godly man because the dreams that he received from God were obeyed by him without any hesitation.
Mat 2:14 (KJB)
When he arose, he took the young child and his mother by night, and departed into Egypt:
The trip would have been about 200 miles (322 km) from Bethlehem to the border of Egypt. They no doubt used the gold they received from the wise men for traveling expenses. They began their journey by night so they would not be caught and by dawn they would be far enough away to escape notice. One of the places they may have gone was to Alexandria which had a big colony of Jews that was settled by them from the fourth century B.C. on. Alexandria was the second largest city in the Roman empire. As the Great I Am of Sinai, the last time Jesus was in Egypt, He brought ten plagues and many miracles to free the Israelites from bondage.
Mat 2:15 (KJB)
And was there until the death of Herod: that it might be fulfilled which was spoken of the Lord by the prophet, saying, Out of Egypt have I called my son.
(Hosea 11:1 KJV) When Israel was a child, then I loved him, and called my son out of Egypt.  Once they arrived in Egypt, they no doubt, had found a place to live and had remained there until the time of Herod’s death. Herod would have no idea that Jesus was now in Egypt. If the Sanhedrin was astute on the Scriptures, they would have known about the Hosea prophecy as well as they did the Micah prophecy. It was a good thing at that time that they were biblically illiterate but sadly, they would remain this way all the way up till 70 A.D when Jerusalem would be razed and they would go on the run.