Complex sentence: A judge would issue a yellow card for the first infraction committed by a competitor, and if the same judge detects the second infraction from the same competitor a red card is issued.
Split into simpler sentences: A judge would issue a yellow card for the first infraction committed by a competitor. And if the same judge detects the second infraction from the same competitor, a red card is issued.