The meeting came just three months after Mr. Musk exited the government in a fit of rage, attacking the president on social media.