well, despite popular myth, goldfish need HUGE tanks. they probably built up too much ammonia and died that way. x:
did you clean the tank out after the goldies died? 2.5 gallons is fine for a betta, and since it's summer, he should be okay without a heater until you can get one. .3.