Old DOT 5 loses its color and goes amber or straw colored. Rub some between your thumb and forefinger while applying considerable pressure. DOT 5 will keep feeling slippery under pressure, while DOT 3 or 4 will resist sliding. It's hard to explain, but easy to feel the difference if you try this with known samples.
DOT 3 and 4 are hygroscopic, which means they absorb water. This is why you should always use a fresh, unopened container and not one that has been sitting around for a while. When too much water is absorbed it lowers the boiling point of the fluid, and boiling your brake fluid causes air bubbles in the system and lack of braking.
DOT 5 won't absorb, or mix with water, but it's very susceptible to aeration, which is why it can't be used in an ABS system (ABS pumps acting somewhat like a paint shaker). Avoid the urge to shake your bottle of DOT 5 before you uncap it and break the seal, or you'll be bleeding for a very long time because of aeration.
Mixing DOT 3 or 4 with DOT 5 is a bad idea, but probably not the fatal mess that most forum posts would lead you to believe. I ran across an article a while back where a guy tried to replicate the assertion that mixing the two would cause the fluid to gel, and try as he might, he just couldn't make it happen. Hot, cold, different ratios, didn't matter. They would separate, but wouldn't gel. Some will also claim that one or the other will damage seals made for the other. There's no chemical reason that glycol based and silicone based fluids will act much differently on rubber or plastic seals. In fact, HD uses the same MC rebuild kits across some of the years that use different fluids (The MC part numbers change because of the writing on the lids for different fluids).
So clean and flush as well as you can.... Denatured alcohol does a good job, but get it all out because it actually can damage seals. Fill with the recommended fluid and don't worry much about what may or may not have been mixed.