At the Transfiguration (Matt 17:1-8) how did Peter, James, and John know it was Moses and Elijah Jesus was talking with?
I think the most logical answer is that Jesus told them as they were walking up the mount, “Hey, guys, I’ll be conversing with Moses and Elijah when we get up there, so please don’t freak out.” These were probably not his exact words, but you get the picture.
Another possible explanation is given in Luke 9:32-33. Luke’s version states that Peter, James and John were heavy with sleep but “kept awake.” After telling Jesus that they should build booths, Luke describes Peter as “not knowing what he said.” I propose that the same action, that of the Holy Spirit, that kept them awake, also revealed the identities of those with whom Jesus was speaking. Still, I think the first explanation is the most plausible.
Also, if you’re wondering why Peter told Jesus that they should build three booths, recall Leviticus 23:33-44, in which God, through Moses, commanded the Israelites to live in booths for seven days that future Israelite generations “may know that [God] made the sons of Israel dwell in booths when [He] brought them out of the land of Egypt.” The booths signified Israel’s exodus from Egyptian enslavement on their way to the Promised Land.
Lk 9:30-31 adds a detail missing in Matthew’s and Mark’s versions of this event. It says Moses and Elijah “spoke of [Jesus’] exodus, which he was to accomplish at Jerusalem.” With both exoduses (that of the Israelites and of Jesus) in mind, it seems Peter wanted to memorialize these events by erecting booths. Through Jesus’ exodus from this earth, a new Exodus from the slavery of sin would be accomplished; thereby, giving all humanity the way to God.