Am I heading the right direction for my choice schools? (Cornell, UC Berkeley, U Mich)

I know it seems silly to retake a class when I earned a B grade, but it gives me so much anxiety just looking at it. It would make me feel a lot better if it was replaced.
Plus, U of M takes the absolute value of grades while taking your GPA, so if I manage to bring it up to an A- I will have a perfect 4.0 in their eyes which will be amazing for applications. I’m trying to get into U of M most of all.