Need help

My son is 3 weeks old and he had diarrhea from his formula which the doctors made me switch because he was allergic to it and his butt is red and it looks like it was bleeding from it being so sore. What can i do for it to go away