Well, first off Goldfish should NOT be with Bettas. They are Colwater and Bettas are tropical or warmwater. Plus, for 2 Goldies you'll need at least 110 gallons. It looks like he is in a bowl!!!
Anyways, it looks like he has ammonia burn developing because he is in too small of a bowl and needs double filtration, so all the waste is turing into ammonia which is literally burning him. It isn't contagious, but your other fish will get it if he has it. It means the water quality is just awful. They will most likely die unless you get them the proper home.
*2 Bettas (for now RIP Ryu) *2 Goldfish *9 Guppies *1 Gourami *2 Chinchillas *2 Budgies *2 Dwarf Frogs *1 Dog *1 Cat *2 Hermit Crabs *2 3gs *1 10g *1 Pond *2 2gs