Thanks for asking a question on www.thisisyourbible.com.
Moses and Elijah were the two chosen to be a part of the vision [ Moses and Elijah were actually dead but the apostles were given a vision of them] because they, more than any other represented the Law [Moses] and the prophets [Elijah]. Both of them experienced rejection by their people and yet came back to save them. In this their experience was like that of the Lord Jesus and would have been a great comfort to him.
Here is a link to information on the site which will help you with your question:
The Transfiguration www.thisisyourbible.com/library/show/345
If you want to come to grips with what the Bible really teaches, why not take the free Bible study course on www.thisisyourbible.com? You may take this course either online or by regular mail.
This course will give you a background in the major themes of the Bible from Genesis to Revelation. As with everything we offer, there is no cost to you other than your time and effort. You will also have a personal tutor to whom you may pose questions either from the course itself or those questions which come to you as you read the Bible.
I hope you have found this helpful.