Premed Math Class help!

there’s really no “good” solution, the least problematic is to avoid a bad grade - the odds of getting all A’s after an F in the midterms are remote. A Pass/C followed by an A in 16A will be better than taking the risk of tanking his/her GPA first semester freshman year (which would totally sink any shot at med school anyway but would also handicap OP for any other goal).
Med schools won’t know about the AP class BTW.