Buying car and driving from LA to Lima as foreigner?

Hi, I have done a bit of research but have not found any concrete evidence of whether buying a car as an Australian/foreigner was worth the time and effort/uncertainty of buying and then selling a car for this trip. I am open to buying from other travellers  and from mexico but I have read that this is much harder.

Has anyone done this and would like to advise on the best way to go about this?

Thanks for your help :)