Sales Price $350,000
Profit after everything is $40,000
California Form 593 is gives me the option to withhold 3 1/3% of Total Sales Price
12.3% of Gain on Sale
The form is withholding tax on your behalf so you get a credit for it when you file your tax return and report the sale.
it appears that you already calculated the gain on the sale so I would go with that calculation.
However, you should consult your tax advisor.