We believe that there are different paths which a person can take, and there is a specific reaction according to what they have chosen. Allah(SWT) knows every single possiblilty which is going to happen, and how.