Luke 9:33

33 As the men were leaving Jesus, Peter spoke up. "Master," he said to him, "it is good for us to be here. Let us put up three shelters. One will be for you, one for Moses, and one for Elijah." He didn't really know what he was saying.

Luke 9:33 Meaning and Commentary

Luke 9:33

And it came to pass, as they departed from him
That is, as Moses and Elias departed from Christ; or "when they began to depart", as the Syriac version renders it; or "would depart", as the Arabic and Persic versions; seemed desirous of going, or made some signal or other by which the disciples perceived they were about to go; for, as yet, they were not gone;

Peter said unto Jesus, master, it is good for us to be here, let us
make three tabernacles, one for thee, and one for Moses, and one for
Elias; (See Gill on Matthew 17:4)

not knowing what he said,
nor "what to say", as Mark observes, being in a surprise, and not in a situation to consider and weigh things well, whether what he said was right and proper, or not; (See Gill on Matthew 17:4)

Luke 9:33 In-Context

31 appeared in shining glory. Jesus and the two of them talked together. They spoke about his coming death. He was going to die soon in Jerusalem.
32 Peter and his companions had been very sleepy. But then they became completely awake. They saw Jesus' glory and the two men standing with him.
33 As the men were leaving Jesus, Peter spoke up. "Master," he said to him, "it is good for us to be here. Let us put up three shelters. One will be for you, one for Moses, and one for Elijah." He didn't really know what he was saying.
34 While Jesus was speaking, a cloud appeared. It surrounded them. The disciples were afraid as they entered the cloud.
35 A voice came from the cloud. It said, "This is my Son, and I have chosen him. Listen to him."
Holy Bible, New International Reader's Version® Copyright © 1995, 1996, 1998 by Biblica.   All rights reserved worldwide.