For people may labor with wisdom, knowledge and skill, and then they must leave all they own to others who have not toiled for it. This too is meaningless and a great misfortune.
NIV
For here is a man whose labor is with wisdom and knowledge and skill; yet to a man who has not toiled for it he must leave it all as his portion. This also is vanity (emptiness, falsity, and futility) and a great evil!
AMP
For there is a man whose labour is in wisdom, and in knowledge, and in equity; yet to a man that hath not laboured therein shall he leave it for his portion. This also is vanity and a great evil.
KJV
So I turned my mind to understand, to investigate and to search out wisdom and the scheme of things and to understand the stupidity of wickedness and the madness of folly.
NIV
I turned about [penitent] and my heart was set to know and to search out and to seek [true]wisdom and the reason of things, and to know that wickedness is folly and that foolishness is madness [and what had led me into such wickedness and madness].
AMP
I applied mine heart to know, and to search, and to seek out wisdom, and the reason of things, and to know the wickedness of folly, even of foolishness and madness:
KJV