Don't keep your bettas in the same tank as your goldfish. Two different species of fish that live in completely separate environments with separate needs.
Bettas like warm; Goldfish like cold. goldfish also need huge spaces (Commet goldfish or feeder goldfish need 20 gal per fish at least since their bodies can stop growing, but their organs cannot). Goldfish also produce a ton of waste, so overall it's not a good idea to house the two species together.
Maybe invest in a 10 gallon, 2 dividers, and a heater to keep all three of your bettas in? I've found they do well in this set up so long as there are plenty of plant and usually a female in the middle (I've had 2 tail biters in this set up but 1 was too aggressive and 1 is still unknown).
Your pictures honestly look more to be bloating. Fast him for a few days and 1 tsp/gal epsom salt should help. Should his poop look stringy and white, start on a parasite med like General Cure or Jungle Anti-parasite Fizzies.
You do vacuum out all the extra food, right? If not, he might be eating the left overs when you're not looking.