It sounds like velvet, given his coloring and the flashing against objects. You are right, he may have had it for quite sometime already, as was the case with my girl (she came home from the store with it). Sometimes, it's very difficult to see on certain colors of fish and looks more like a greying or dulling of color. My girl is brownish red, so it was very hard to spot at first, until she had it very badly.
I never put my girl in a smaller tank to treat her, I just treated the entire tank (she's by herself, so that wasn't an issue). I used quick cure from wal-mart to treat her. Keep him dark and warm to help speed up the velvet life cycle. The warm water helps mature the parasites, at which point they will begin to drop off the fish. They are photosensitive, so the darkness hinders their reproduction. The important thing to remember about velvet is that fish are already carriers of it, there are generally a few velvet parasites living on the fish at all times. The parasites just can't control unless the right circumstances are there, such as the cold, dirty water you see at the pet store, which is why, many pet store bought fish end up with it once they get home. You will also see it take hold when the fish's immune system is compromised by another illness, especially in the case of your fish where he may have already had an outbreak, his immune system was just too tired to fight it any longer and it spread.
While he's in the hospital tank, you can keep the 5 gallon dark and hot. Heat it up well past 82 degrees (unless you have live plants or tank mates). It may not hurt to put the medication directly into the 5 gallon for a day or two, but be sure to take the filter medium out, because they will counteract each other. You can keep the filter running if you want, just take out the cartridge.
I hope this helps, Let me know if you have any other questions.