Hi Sir,
In Malachi, God is talking about his fidelity to his promises from generation to generation. In Exodus, he shows that prayer can influence the outcome of things, but God has not changed, since he knows from all eternity whether we will pray or not.
We don’t need the Bible to tell us that God is unchangeable. It is something we can learn through philosophy. Having the fullness of being, being infinitely perfect, he is not perfectible, which means that he can’t “change His mind”, which would mean that he made a wrong decision to start with.
Verbum