Could something that we are destined to encounter be changed as a result of our prayers? Say, if one is destined to have a serious illness, and he prays to God to keep him in good health and spare him all serious illness, can this be answered?

Yes, God may accept our prayer and grant us what we ask for. He will then change what He had written in order to give us what we have requested. God says in the Qur’an:

“God may annul or confirm whatever He wills.” (13: 39)

But the change is known to God in the first place. He knows that a person will pray Him sincerely, and that He will change what is written in answer to that prayer.