The legal clash in a courtroom across the bay from San Francisco pits the world's richest person against a startup Musk once backed and now competes with in the booming AI sector.