All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
You have not told us whether you had the brownish discharge after the termination of the usual duration your menses. If that discharge was after your usual duration of menses, then you were pure during Tawaaf Al-Ifaadhah, according to what the Hanbali scholars hold as the preponderant opinion. Building on this, your Tawaaf after the termination of menses is valid even if you had the brownish discharge afterwards. Also, your Tawaaf is valid if you verified the termination of menses by entering a white piece of cloth in your vagina then taking it out without any blood on it. In that case, if you had Ghusl and made Tawaaf even before your usual duration of menstruation has ended then the blood flowed again or you had brownish or yellowish discharge, then you are not liable for anything. This is considering the days when the blood flowed as the days of menstruation, and the days when menses was absent as the days of purity. That is what we understand from your question.
If you did not make sure that you were dry before having Ghusl, then you made Tawaaf during menses. This case is contested among scholars. Many of them maintain that that Tawaaf is invalid, whereas others say that it is valid and that a sheep is to be slaughtered, according to Imaam Ahmad or a camel is to be slaughtered, according to Abu Haneefah .
Based on the view of scholars who think the Tawaaf is invalid, you are still in the state of Ihraam and you should avoid the violations of Ihraam. When you go to Makkah, make Tawaaf first, then Sa‘y, then terminate your Hajj by shortening some hair of your head. After that you may initiate Ihraam for making ‘Umrah.
As regards violation of Ihraam that you committed before terminating Hajj, anything that was for comfort reasons, such as wearing form-fitting clothes and applying perfume, you are not liable to anything thereof. Anything that you done by way of removal, such as shaving hair and clipping nails, then you are liable to a single Fidyah for each sort of violations even if it was repeated more then once.
It should be noted that having sexual intercourse during Ihraam forgetfully or out of ignorance of the ruling does not invalidate your Hajj. No liability is applicable according to some scholars, which is the opinion chosen by Shaykh Al-Islam Ibn Taymiyyah .
The Fidaya (ransom as substitute) can be offered by either slaughtering a sheep, providing food to six needy people, or fasting three days.