A Uhaul Phoenix to San Francisco is $300 miles included. Gas would be about $300. Rates vary depending on where they need the trucks.Uhaul truck is only $19.95 a day but there is $.70 per mile that would add up fast. Motorhome rental might be cheaper overall.
Might be best to buy a used vehicle for the several months adventure. Old motor homes are cheap, sometimes free.