I saw all the living who walk under the sun, that they were with the youth, the other, who succeeded him.
Solomon was himself a king, and therefore may be allowed to speak more freely than another concerning the vanity of kingly state and dignity, which he shows here to be an uncertain thing; he had before said so (Pro 27:24, The crown doth not endure to every generation), and his son found it so. Nothing is more slippery than the highest post of honour without wisdom and the people's love.
Commenting on Ecclesiastes 4:13-16
Ecc 4:15-16 “I saw all the living which walk under the sun on the side of the youth, the second who shall enter upon the place of the former: no end of all the people, all those at whose head he stands.” The author, by the expression “I saw,” places himself back in the time of the change of government.
Commenting on Ecclesiastes 4:15-16
I considered all the living who walk under the sun, with the second child that shall stand up in his stead. (k) Who follow and flatter the king's son, or him that will succeed to enter into credit with them in hope of gain.