Baby butt bleeding after constipation

Sadie

So my some is 5 months. He eats occasional purreed baby foods that have been suggested and approved by the doctor. However I noticed he was constipated and the doctor said bring him in if he goes 3 days without pooping. Today was the 3rd day and he was trying really hard and it was very hard so I help by pushing on his bottom and alot came out. But I caused him to bleed light red blood in his anus. Like because he was straining. What can I do to help?