Does a “C” grade in AP stats validate my “D” in Algebra 2?

So I got a “D” for my second semester of Algebra 2 from sophomore year. I just finished my junior year and will be a senior this fall. I have tooken a finite/statistics course and got B’s for both semesters. According to my school website, the prerequisite for that class is Algebra 2. Since I got a Higher than a “C” grade for that class, does it validate my Algebra 2 “D” for a CSU?
I will also be taking AP stats my senior year and if finite/statistics does not validate my grade, will AP stats validate it if I get a “C” or higher?

I’m in-state by the way and plan on going to either San Jose or SF state

My current weight gpa is 3.17
And my non weighted is 3.00

Look up your high school in https://hs-articulation.ucop.edu/agcourselist#/list/search/institution . Check if the math course you completed with B grades is listed as statistics or advanced math. If so, then it validates algebra 2 (and algebra 1), according to http://admission.universityofcalifornia.edu/counselors/files/csu-uc-a-g-comparison-matrix.pdf .