If you got your period for few days and then you saw your purity which tells you that your period is over, take ghusul and fast and pray. If you see after that colored discharges, ignore them! But if you see the flow of the blood again, you must stop until the total of the first period and the second reaches 15 days in a month. Then you can consider this blood that exceeds 15 days to be irregular bleeding and you can fast and pray.