This may sound very simplistic, but here goes. After you work out, do you immediately take off your socks and shoes? I had the same problem with my big toes a while back. The nails were yellowing, but not thickening (which is a usual sign of fungus). I showed my DH who is a physician, who says, it looks like "jungle rot". I have no clue where he got this phrase from, but apparently soldiers over the years have had problems like this from wearing wet boots. I assume that mine was a mild case of this, I started taking my tennis shoes right after my work out and using some of that udder cream that is good for your nails. It took about a month to notice a big difference.
The other thing I will mention is that Flagyl is a heavy duty medication, so please be careful when taking it. Please do the blood work they ask for to check your liver, if you do decide to do the meds.