Humans make good workers and good resources. To use your own resource argument, it would take a lot of resources to exterminate the humans. Why not help each other?
Why does your imagined AI need to expand to the point to need all of Earth resources? And if it does, why would it stay to begin with then?