Devi Mahatmya - Markandeya Purana, tr. by Bibek Debroy
Chapter 13 (Ch 89 in the book)
Rishi Sumedha concluded his account of the Devi Mahatmya, telling both king Suratha and the vaishya Sumadhi that the cause of their attachment and discontentment was on account of Mahamaya. He advised them to seek refuge in Parameshvari. Both Suratha and Samadhi took leave of the sage and went on to worship the goddess. By the banks of a river, they fashioned an earthen image of the goddesss and worshipped her. Satisfied, Chandika manifested herself in front of them and offered them boons. The king asked that he get a kingdom that could not be vanquished in his next life, while the vaishya asked for the wisdom (gnana) to rid his mind of the sense of 'me' and 'mine' that afflicted him.
The goddess gave king Suratha the boon that he would not only regain his kingdom in a few days, but in the next life, he would be born as Savarnika to the god Vivasvat, and go on to become Savarni Manu. The vaishya would obtain the gnana he desired.
This ends Devi Mahatmya.
Reference: Markandeya Purana, translated by Bibek Debroy. Published by Penguin, 2019. The Devi Mahatmya is covered in chapters 78-90 of the Markandeya Purana.