Dear shradha rana
There are various causes of blood in the faeces and/or urine. This symptoms also depends up on the Age, Sex, duration and other related factors, thats why its very difficult to presume what might be the cause of bleeding in your case because you haven't provided the enough informations.
However I have couple of things in my mind, but I would like to highlight few things related to the this symptoms.
For blood in the Stool: there are several disorders which may cause bleeding into the of the guts (intestines). For example: ulcers, colitis, polyps, and bowel (colon) cancer. If these bleed heavily then your faeces would be obviously 'bloody' or a very black colour. However, sometimes these disorders only bleed with a trickle of blood. If you only have a small amount of blood in your faeces then the faeces look normal.
For blood in the Urine: There are multiple causes of hematuria. Some are serious, including cancers, trauma, stones, infections, and obstructions of the urinary tract. Others are less important, and may require no treatment. These may include viral infections, nonspecific inflammations of the kidney, medications which thin the blood's clotting ability, and benign prostate enlargement.
As I said blood in the Stool/Urine is a vague symtoms you need to go through a couple of test like; Stool R/M/E and Urine/R/M/E then you will need to do some other sofesticated test includeing invasive and non-invasive investigations to find out the exact cause of the problem.
Therefore I would like to suggest you to seek a professional help. Go to the hospital and get the expert opinion.
Further Reading: Rectal Bleeding Rectal Bleeding Symptoms & Signs Index Blood in the Urine Blood In Urine (Hematuria)
Best of Luck