It's a divided tank? I'm sorry, but you're really not giving me the details. If it's divided and there's anything else I need to know, could you go ahead and tell me?
In divided tanks, you want caves for fish to hide inside in each section as well as something to break up the line of sight along the divider. your tank pics looked rather sparse of that, which is a slight issue seeing as it seems like your boy won't stop flaring. For now, keep your boy in his cup, and once a week be sure to do a 100% water change along with the 50% daily. Once you put him back in, you have to have things in there to break up the line of sight along the divder. Silk plants will work (regular silk plants not intended for aquarium use have to be soaked in a tub prior to adding to make sure it won't leak color), so will ordinary things like mugs.