For a 5 mile commute I would just head over to target or walmart and buy a Shwinn road bike (around $200) or the GMC Denali ($150). Inexpensive bike and the most you need to tighten the bolts, adjust the pads, and other basic things. It's easy enough to figure out what size bike to get. You can get all technical and measure and stuff or just take the biggest bike you see (probably 26") and step over it and make sure you have clearance and aren't risking your manhood. It's easy to figure out how to raise a seat up as well as a stem. There are tons of people here that'll help as well as tons of websites for it.
For serious off-roading, I wouldn't do that on a walmart/target bike. I'd start going to lbs's or searching want ads or ebay or something... but for a short commuter you need not spend 5 bills on it. Expecially since you'll still want a good lock, a helmet, waterbottle, pump, spare tubes, patchkit, lights (if you ride after dark) and other stuff. Plus if you go buy some super nice bike from your lbs you'll need even more serious locks to help prevent theft. And even good locks won't stop a bike from getitng taken(or taken apart) if someone really want's it.
I ride my gmc denali in 30 mile runs on our local bike trail, up a mountain road by my house with some above 10% grading, and around my little city. It's good enough for me. If I had a 5 mile commute I'd have no problem doing that on the Denali or even a cheap ridgid frame MTB from one of the big box stores.
There are a lot of anal bikers though that only ride big name brand bikes. Anything under $500 to these people just aren't real bikes or something. Luckily not all bicyclist are like this. The only bike that sucks is the one that you never ride that just sits around and collects dust. Big name bikes can collect dust just as easily as something cheap.
Even a 40 pound mtb can be ridden easily in 5 miles. The main thing is the gearing. A road bike often may not be geared as well for super mega hills... an MTB will be. The Denali atleast for me is geared more like an MTB... which means a lower top end but an incredible low end.
So don't be afraid of non-bike shop bikes. Used bikes most often don't come form bike shops and people have no trouble recommending them. I have no trouble recommending shopping around.
$500 will go far enough to get you a couple inexpensive bikes. If one get's stolen you won't be out as much.