Don't get me wrong, I am a Trekkie.
But I take it with a kilo of salt.
Back in the 50s and 60s we didn't think we were far from AI... 2/3 of a century later, we still don't think we're far from AI.
We're making progress, but it's glacial, and will remain that way for who knows how long.
When we do get AI, that's the beginning, a beginning that will take who knows how long before we get full AI.
When we do get full AI, our relationship will be what it is now, symbiotic.
If a rational AI wanted to expand, there's an entire solar system at their disposal. They don't need to breathe or eat. They could start building on the Moon, and Mars wouldn't be hard for a machine to colonise.
Back here, a highly intelligent AI would have no trouble at all finding niches to fill in our social/work 'ecology'.