Grades are important, but IMHO the thing that should worry you most is what this is telling you about your readiness for college.
Some kids can’t do the work of calc or chem, but the most likely cause is poor study habits. Either you aren’t studying effectively or you aren’t spending enough time on it. In a college math or science class it would be normal to spend 6-10 hours a week reading the chapters, doing the homework, doing extra practice problems on your own. Given the slower pace of an AP class you should still be spending 3-5 hours each week per class doing this.
Talk to some of your friends doing well in the classes and try to figure out what they are doing differently. Talk to your teachers for advice. There are books about learning and study habits; one good one is “Make it Stick”. You had mentioned in an earlier post you want to go to med school. This doesn’t seem realistic if you can’t do well in HS math & chem classes, so what you have here is an opportunity to turn things around before you’re taking classes like these for keeps in college.