ChatGPT was built by OpenAI and Microsoft has already invested billion in it, so Microsoft already owns equity in OpenAI. Microsoft has also been using OpenAI technologies in their products (e.g. GitHub copilot)