What does Matthew 2:7 mean?
Two agendas are at work in this passage. One is open and honest. The wise men from east have been convinced by Jewish prophecy and a strange star in the night sky that the Christ, the "King of the Jews," has been born in Israel. They have travelled far to honor and pay homage to Him (Matthew 2:1–2).The second agenda belongs to Herod, reigning king of the Jews under the authority of Rome. His full intent will only become clear later in the story (Matthew 2:16). If the Christ has really been born, Herod wants to find Him and kill Him to protect his own power. He has enough belief in God's prophecy to fear it from coming true, but not enough faith to trust God to do what is best for Israel.
Now Herod calls the wise men to come and see him "secretly." Herod is scheming, taking advantage of the wise men, and his instinct is to keep everything as quiet as possible without giving away his plan. His question for the wise men is about when the star first appeared in the night sky. Herod assumes the appearance of this strange star would coincide with the birth of the Christ the wise men have come to find. His purpose for asking this becomes clear later: He wants to narrow down the description of the potential rival.
The answer given by the wise men is not recorded. Scholars speculate that if the wise men had come from Babylon, as some suppose, the trip to Jerusalem may have taken about 40 days. If they left soon after the star appeared, and if that's exactly when Jesus was born, perhaps two months or so have passed. Then again, it might have been much longer. The men might have needed time to investigate the star, come to a conclusion, prepare for a journey, and then make their way to Jerusalem. Herod will later kill children as old as two years in hopes of killing the Messiah.
In any case, Joseph, Mary, and Jesus are no longer in the stable described as Jesus' birthplace in Luke 2. They are now living in a house in Bethlehem (Matthew 2:11).