Let me clarify, they were three there: Moses, Elijah, Christ. But God the Father eliminated the two, thereby confirming the New Covenant, Moses being the Old Covenant, and Elijah the bridge of the old and the new.
Moses' and Elijah's appearances there were but just optical illusions.:)