I have a question concerning free agency. Mormons believe that men are free to choose but how is it that there are prophets that can see what will happen? So they know what people will do? Like Jesus knows that Peter will deny him thrice it's like Peter is destined to do it stripping him of free agency.
That is a great question, and sometimes I have pondered that myself. Through study of the scriptures and church resources I have come to this conclusion:
What is Agency?
Basically, agency is the ability and privilege God gives us to choose and to act for ourselves. Agency is essential to God's Plan of Salvation. Without it, we could not make the choices for ourselves. Satan wanted to remove agency from the Plan so everyone would come back and live with God again. (Moses 4:3) Agency allows us to be “free to choose liberty and eternal life, through the great Mediator of all men, or to choose captivity and death, according to the captivity and power of the devil” (2 Nephi 2:27)
Jesus knew Peter would deny Christ three times before the cock crowed. This is not stripping him of his free agency. As a father, I watch my children, and often times I know what they will do, or what the outcome of their choices will be before they make them. I then warn them. Often they still follow through. I am not stripping them of their agency. They still make the choice and the consequence follows. In my case, I know what will happen because I have learned their personalities and what choices they will make combined with my experience.
What is the purpose of a prophet?
As stated in the church's website:
As members of The Church of Jesus Christ of Latter-day Saints, we are blessed to be led by living prophets—inspired men called to speak for the Lord, as did Moses, Isaiah, Peter, Paul, Nephi, Mormon, and other prophets of the scriptures. We sustain the President of the Church as prophet, seer, and revelator—the only person on the earth who receives revelation to guide the entire Church. We also sustain the counselors in the First Presidency and the members of the Quorum of the Twelve Apostles as prophets, seers, and revelators.
Like the prophets of old, prophets today testify of Jesus Christ and teach His gospel. They make known God's will and true character. They speak boldly and clearly, denouncing sin and warning of its consequences. At times, they may be inspired to prophesy of future events for our benefit.
We can always trust the living prophets. Their teachings reflect the will of the Lord, who declared: “What I the Lord have spoken, I have spoken, and I excuse not myself; and though the heavens and the earth pass away, my word shall not pass away, but shall all be fulfilled, whether by mine own voice or by the voice of my servants, it is the same” (D&C 1:38).
Prophets purpose is to testify of Christ and warn of the consequences of sin. Isaiah was a prophet who testified of the destruction of Jerusalem and what it will be like in the last days. John wrote Revelation which is all about the destruction of the world. Their prophecies did not rid people of their agency. Like them of old, the prophets in our day can see into what will happen but this will not rid an individual of their agency.
I hope this answered your question. If you need clarification, please let me know!
There isn't really anything here unique to LDS belief.
Every Christian believes that both God and prophets have seen the future. And almost all Christians believe that men are free to choose right or wrong.
There are a lot of ways to explain this.
The simplest is probably this: Knowing someone's decision in the past doesn't mean they didn't have free will. Likewise, knowing someone's decision in the future doesn't mean they won't have free will either. (see Brian Rushton's comment)
Of course, you typically only know the past, but some, namely God and his prophets, also know the future.
I'm not LDS, but belief in free-will is not limited to the LDS either. Its a belief shared pretty much by all non-Calvinists (other than maybe classical Arminians, which differ from what is normally meant by "Arminian").
Prophets give contingencies: If you obey, God will do X (or cause X to happen), if you disobey, God will do Y. Jesus predicting Peter's betrayal is the only exception I can think of off the top of my head (plus you mentioned it anyway), and can fit in the same category (I think) as when I can just predict that the guy the next lane over is about to try and cut me off. Some things you can obviously see coming without the future having to be pre-scripted, and especially if you're God or inspired by God.