If you're panicking about anything, ask your question here and someone will be happy to help. For more serious issues you'd rather discuss in confidence, visit Student Support Services.
I'm not sure if there are any car rental services in St Andrews. I can't think of any, at least. You may have to go to Dundee, where a lot of the big national brands are.
Well, is there not that car showroom near Aldi and Morrisons, near the end of Bridge Street? I'm not sure if they'd do rentals, and if they did, I'm not sure about prices... But it might be worth checking it out anyway. =)
Go to the Travel Office in the Union: They have a contract with Enterprise in Cupar, who will come and collect you from St Andrews.
It always takes longer than expected to be driven to Cupar, sort out the paperwork, and drive yourself back: Allow at least a couple of hours before picking up passengers in St Andrews - and considerably longer if you have to read the driver's handbook before you can release the parking brake (10 minutes reading!) or open the filler cap (20 minutes reading!).