Just don't do it. Experimenting like that just stresses out the fish. Goldfish, done right, need a lot bigger tank (20gal per fish is optimal) than it appears when you first get them, otherwise they just get stunted and look pathetic.
Bettas do NOT like company... ever. Even when they breed they beat the ever-living-life out of the female first. Some will tolerate company better than others, but still not a good idea to experiment with these guys. Heated, slow-filtered 5 gallon tank with NO company and some food now and then is all a betta can ever dream for!