UC to UC transfer problem?

Hello,
I am currently a UCR freshman ending my third quarter. I need some feedback or advice for a problem I am currently experiencing. I am taking a math class that I know I am either going to get a low C or D and I was wondering if taking it again will replace the previous grade. Also, I am trying to transfer to UCI and was wondering if the admissions office will see this. Also, this will interfere with my sequence (prerequisites) for other class including chem and bio. Will I have enough units to even transfer by junior year if I am already two maths behind?