Some states have a nice Bill of Sale that you can print out. Some will also require it to be signed in the presence of a notary. The SELLER is the one who's required to sign the title before it can change hands. You can put whoever's name you feel like in the "Buyer" section before you go to register it.
Carrying around $40k cash is never really a good idea. Give him a certified check, or if it's from a place like Capital One, he can call a ph# to make sure the funds are guaranteed. Or, like Plum said, you can both go to the bank so the seller can be sure the check is good, plus, banks usually have a notary onsite.
I bought mine site-unseen, so it was a little different.