Volvo XC70 2000 has problem starting

the car has been sitting for 3 weeks due to vacation, since then I been only driving it to work (less then 2 miles), today my wife took it to the hardware store and when she came back it was dead. after jumping it, it ran 2 miles and was out of power again, straight jumping it did not help, but charging the battery did? this went on several times until we made it home. any ideas? what it is and how to cheaply fix it?

Hook up a battery charger now that you are home and get the battery up to a full charge. If the battery is OK and holds the charge you just had the battery run down on power due to lack of use. If the battery is good but the problem occurs again after the battery was fully charged then your alternator could be going bad.

the battery is only 4-5 months old, so I think it might be the alternator, which would suck big time

was the alternator, crap