Allah knows what is going to happen as he is the creator and sustainer.
If one make dua that does not mean Allah is going to change persons taqdeer but Allah already knew a person is going to make dua on a a particular day and HE will fulfill his wishes and accordingly written persons Taqdeer (Fate and Destiny)