"The apostasy prevailing in Ahab's day was the result of many years of evil-doing. Step by step, year after year, Israel had been departing from the right way. For generation after generation they had refused to make straight paths for their feet, and at last the great majority of the people had yielded themselves to the leadership of the powers of darkness. PK 133.2"
"But they hearkened not, nor inclined their ear, but walked in the counsels and in the imagination of their evil heart, and went backward, and not forward."
Both passages describe a gradual turning away from God and towards evil. The EGW passage specifically mentions Israel's departure from the right way over generations, while Jeremiah 7:24 speaks of walking in the imagination of their evil heart and going backward. The connection is thematic and supports the idea of a progressive decline.
"“O God of our salvation, ... Thou makest the outgoings of the morning and evening to rejoice. Thou visitest the earth, and waterest it: Thou greatly enrichest it with the river of God, which is full of water: Thou preparest them corn, when Thou hast so provided for it. Thou waterest the ridges thereof abundantly: Thou causest rain to descend into the furrows thereof: Thou makest it soft with showers: Thou blessest the springing thereof. Thou crownest the year with Thy goodness; And Thy paths drop fatness. They drop upon the pastures of the wilderness: And the little hills rejoice on every side. The pastures are clothed with flocks; The valleys also are covered over with corn; They shout for joy, they also sing.” Psalm 65:5, 8-13 , margin. PK 133.4"
"By terrible things in righteousness wilt thou answer us, O God of our salvation; who art the confidence of all the ends of the earth, and of them that are afar off upon the sea:"
EGW directly quotes Psalm 65:5.
"They also that dwell in the uttermost parts are afraid at thy tokens: thou makest the outgoings of the morning and evening to rejoice."
EGW directly quotes Psalm 65:8.
"Thou visitest the earth, and waterest it: thou greatly enrichest it with the river of God, which is full of water: thou preparest them corn, when thou hast so provided for it."
EGW directly quotes Psalm 65:9.