**if you buy the same car either way**, then a low rate loan might be cheaper than the student loan interest rates (the OP didn't specify there). However:
Most of the time banks and credit unions are less willing to loan small amounts (and $5k counts as a small amount) on older cars at good rates.
You'll require comprehensive and collision insurance if you have a loan, which can add hundreds of dollars per year to your insurance costs.
Most of all.. when you get that loan qualification it's really, really tempting to buy just a bit newer, nicer, more expensive ride.
I just weighed these factors out myself. I was in the market for another Prius; I could buy a 2008 or newer and get 1.75% financing from my credit union. Almost free money, right?! Problem was, most of the cars I looked at were $8-9k minimum, my insurance costs would increase by $500/yr.
I found a 2004 in good shape for $4900. Paid cash today, insurance remains the same as my old Lexus (no comp/collision).