"God is unvarying, reliable, constant, and perpetual. God never adds or subtracts from His character and emotions. They are constant and unmoving. We should be forever grateful that God is immutable, as this provides an assurance of His love and mercy toward us."
The above snippet copied from the internet provides an excellent hypothesis for defining the immutability of God.
However, to move from being an understanding formulated by man, we must verify these attributes are found in scripture, rather than read into scripture.
Numbers 23:19 (NASB)
“God is not a man, that He would lie,
Nor a son of man, that He would change His mind;
Has He said, and will He not do it?
Or has He spoken, and will He not make it good?
The above clearly teaches God keeps His word and does not vary, that we can rely on His word, and that God is consistent.
Hebrews13:8
Jesus Christ
is the same yesterday and today, and forever.
Here we can add that God's character and attributes do not change over time, thus we can now support the attribute of being perpetual, thus God's attributes do not change over time. However, God does as He pleases, thus He can treat one person one way and treat another person another way or both people the same way. He can condemn one individual and bestow mercy upon another.
God dictates His actions, rather than His past actions dictating His future actions, so He can formulate the Old Covenant and then inaugurate a New Covenant.