was on it for 3 months and stoped taking and flunked drug test for work
It shouldn't show up in urine after 24 hours or so, although it will show up in blood for much longer. If you take your prescription with you to the drug test and tell them about it ahead of time, there shouldn't be any problem. For more information about employment-related drug screenings, read: "Passing" Those Drug Screenings
If you stopped taking it awhile ago, it shouldn't have shown up. The best I can suggest is to explain the situation to your employer and show them your prescription bottle if you still have it – or get a copy of your prescription from your pharmacy or doctor to verify that it was a legitimate prescription.