Free will is the ability to choose between different possible courses of action unimpeded.Free will is closely linked to the concepts of responsibility, praise, guilt, sin, and other judgements which apply only to actions that are freely chosen. It is also connected with the concepts of advice, persuasion, deliberation, and prohibition. Traditionally, only actions that are freely willed are seen as deserving credit or blame.
Thank you for your question. This is not an issue that is to be proven in a logical sense as it is a presupposition. Presuppositions are judged according to their coherency, consistency, explanatory power and their implications (for more on these criteria please refer to the field on analytic philosophy). As such to discuss free will one would have to look into both the implications of free will and of determination and consider that within the framework they are using to understand a number of other questions. For this reason, the traditions that we have explaining the necessity of free will focus on the injustice of reward and punishment without meaningful free will. This is an appeal to the lack of consistency of determination with the Justice of God in meaningful judgment and also to the implication of pointlessness in His testing His creation.
May you always be successful
When Allah says that He will guide whom He wills, it reminds us to be humble. We cannot consciously choose guidance in the same way that we might go to a shop and buy bread. Nor do we deserve it automatically.
Rather, guidance - like faith, wisdom, and other intangibles - is a gift bestowed upon us by the divine, and is something we should be grateful for, rather than arrogantly thinking that we determined it on our own.
However, these intangibles - like guidance, faith, and wisdom - are not bestowed on people randomly. They are similar to plants growing from a seed. A person can prepare the ground, plant the seed, water the plant, and so on, but after they have done everything they can, all they can do is pray that the plant will grow well. However, that person will have a much better chance of the plant growing than someone who simply throws a seed on the ground in the desert and ignores it.
Similarly, we can prepare the ground of our hearts to receive guidance, etc, by sincerely seeking the truth; acting honestly, genuinely, and humbly; putting forth eforts to seek knowledge, and the like. Thus we "earn" guidance - but, of course, we are reminded that we cannot force it through our actions.
Conversely, some people disqualify themselves from guidance by indulging in evil, destroying their souls, being arrogant, or doing other things which seal their hearts. They would not benefit from the guidance even if a tablet descended to them from the heavens because they are not ready to receive it.
Allah is just, merciful, and all-knowing and would not deprive someone of guidance unjustly.
It is an excellent question to ponder however!
You can find more discussions of this question in the tafsir of the relevant ayat.