I had csection and got my tubes tied in august. I have been bleeding for 3 months. After failed medicine I have to have a hysteroscopy. Whats da cause?

Needs investigation. The reason your doctor is doing a hysteroscopy is to look inside the uterus to determine the cause of your bleeding. After the procedure he or she will be able to tell you what was seen inside that is causing the bleeding.
Hysteroscopy. Hysteroscopy is the best way to check if the inside of your uterus is clean.