For under 5k you are looking on a case by case situation. I'd pick an unpopular / uncool car in your area that has good maintenance and reliability rating, something that has no major known issue that you cannot fix easily (i.e. no known transmission design problem, no known gasket problem, no known sludge problem, no known whatever problem that will suddenly make your car not worth fixing).
We also don't know how good are you with wrenching. If you change your own oil and can replace a few filters, plug wires, spark plugs, brake pads, etc, I'd say most low price domestic with no known problems would be good. If you go to a mechanic to do everything, well, I'd stick to a more reputable car and pay a bit more just to be safe. A reliable enough car for most of us that can change intake manifold gaskets or flush coolant is not a reliable enough car for people who can't.
Personally, I'd pick a Cavalier, Prizm, Vibe, etc, and stay with 4 cylinders instead of V6 of any kind (because they are harder to work with so it would be more expensive to maintain, and will never get as good of an mpg).