I've seen 2 bettas kept in a 5 gallon before, but I don't think it's recommended. they usually say a minumum of 10 gallon for 2 bettas, or 4 gallons per fish.
And you have to also remember that even though you are purchasing a 5 gallon tank, after you put your gravel and decorations in, the betta actually has much less than 5 gallons of water volume to swim around in.
Also, when people keep them together, they're usually females, since males are highly territorial and will kill another male if they come in contact. Even keeping females together though, its recommended to have a group of them, at least 3 or more, more preferably 5 or some other odd number, to make it less likely for them to develop a pecking order. But of course a 5 gallon is too small for this.
Many people just keep bettas in room temperature water, but they actually need a heater in their aquarium. They come from warm tropical calm waters. 78-80 degrees is ideal, never go under 74, their immune system will weaken.
If you do keep two males in a tank together with a divider, they will still constantly see each other through the divider and flare their gills and what not so it's probably not a good idea, I'd see it as a constant stress.
Some acceptable tank mates for bettas are neon or cardinal tetras, black skirt tetras, platys, rasboras, danios, snails, and small catfish such as cory catfish. You could add a dwarf frog also, but only after researching how to care for it properly, and they can be a bit dirty at times, might call for more water changes. It's not recommended to put them in with anything with brightly colored long flowing fins, as they might think it's another betta and attack it. Also, just have to watch and make sure none of the other fish are fin nippers and trying to bite the bettas fins.
If I were you, I'd go for a 10 gallon at least. They're not much more expensive.
You might want to check out your local Craigslist or Freecycle for tanks. I've seen 40 gallon tank/stand combos go for as little as $30 around here. But as with all things, buyer beware.
I also second that.. I just sold my old 29 gallon aquarium on there a couple weeks ago with heater, undergravel filter, lid and lights for $30.
Many people sell them for bargains.
My newest aquarium is a 90 gallon, came complete with stand, lids, lights, gravel, 2 fluval filters (very expensive), and 2 pieces of driftwood for $200.
It's just fine.
Just have to inspect the tank well. look for cracks and knicks in the glass, and ask them to fill with water so you can see it doesnt leak.