This is background information about what happened while David was king, before he died and his son Solomon became king after him. (See: [[rc://en/ta/man/translate/writing-background]])
The connecting word **so** connects the reason (God was pleased with Solomon asking him to make him wise), and the result (God made him the wisest man in the world). (See: [[rc://en/ta/man/translate/grammar-connect-logic-result]])