Given that god is omniscient;
Given that you have free will;
God knows the outcome of what will become of you in a situtation called a,
If you chose x
If you chose y
If you chose z
...
..
.
.
.
.
So you have freewill to chose among all those outcomes of you and god is omniscient to know ALL the outcomes even if you chose them or not and knows which one you are inclining towards.
But god has a moral concern to give you the time to make that choice because when you are told you have chosen x which didnt cause you to end up very nice, you cant go out and object, 'no i wouldnt do it. You are a one big tricky god'. Because you are your own witness in this case chosing option x among all the other options given to you.
If you lack the mental capability to the degree of recognizing your options, i.e you are mentally challanged, you are exempt from religion.
All of this can be validated through quran.
But does God not know the specific paths you'll take? The choices you will choose?