So long as the bleeding stopped completely and you became pure, you must do ghusl, and resume fasting and praying. What you saw of yellow or brownish spots is of no significance, because no attention is to be paid to the brownish discharge after the period ends, because of the hadith of Umm ‘Atiyyah (may Allah be pleased with her), who said: We did not regard the brownish and yellowish discharge after the end of menses as being of any significance.
So your ‘umrah is valid, and your cutting your hair after it was valid, and by doing that you exited completely from ihram for ‘umrah, praise be to Allah.
With regard to the bleeding that occurred a few days after using this medicine, and not being certain whether it was menses or not:
If it had the characteristic features of menses, then it was menses.
If it did not have those characteristic features, then it was irregular bleeding that did not make it disallowed to fast or pray.
If the matter was uncertain, and doctors determined that it was not menses, their opinion concerning that carries weight.
And Allah knows best.