Hello everyone, my response to the above question is that Matthew wasn't with JESUS in the mountain.
Matthew was able to write about the scenario because he was inspired by the spirit of God.
2 Timothy 3:16-17 (KJV) All scripture is given by inspiration of God, and is profitable for doctrine, for reproof, for correction, for instruction in righteousness:
That the man of God may be perfect, throughly furnished unto all good works.
Also Matthew wasn't just shown by GOD but he was given permission to write about it,if we look carefully,we would know that JESUS had warn Peter, James and John not to say a word to anyone about what they saw.
Matthew 17:7-9 (KJV) And Jesus came and touched them, and said, Arise, and be not afraid.
And when they had lifted up their eyes, they saw no man, save Jesus only.
And as they came down from the mountain, Jesus charged them, saying, Tell the vision to no man, until the Son of man be risen again from the dead.
If one isn't given permission to speak,he certainly wouldn't speak.
Luke wasn't one of the apostles chosen by CHRIST himself but although he was a follower of Christ during the era of apostle Paul, Luke was also inspired by GOD to write about the transfiguration scenario.Luke 9:28-32 (KJV) And it came to pass about an eight days after these sayings, he took Peter and John and James, and went up into a mountain to pray.
And as he prayed, the fashion of his countenance was altered, and his raiment was white and glistering.
And, behold, there talked with him two men, which were Moses and Elias:
Who appeared in glory, and spake of his decease which he should accomplish at Jerusalem.
But Peter and they that were with him were heavy with sleep: and when they were awake, they saw his glory, and the two men that stood with him.
My opinion is that Matthew wasn't with JESUS in the mountain but yet he saw it through vision so was Luke.
Thanks and God bless
For more of clarity and comments please visit the link below to see the original post by brother Eli