If SpaceX pays too much for it, other SpaceX shareholders have a case against SpaceX leadership. If xAI accepts an offer that is too low, other xAI shareholders have a case against xAI leadership. Given that the leadership is basically the same people, they are very well incentivized to come up with a valuation that is as fair as possible.
And this is not just theoretical, Musk has already been sued successfully once on a similar case, when his companies gave out too much free support to the boring company.
They don't, so why shouldn't he think that way?