Grade calculations when transfering

So I just had a question about transferring, if I got a poor grade and retook the class, will the new grade be calculated into the GPA only or will the two grades be averaged? I’m really losing hope in myself, I had broad dreams of becoming an engineer and unfortunately didn’t put enough time in my first few semesters. Now I’m stuck with C’s and B’s. I realized my mistake and am retaking most course with grades lower than a B.
The school I’m hoping to transfer to is Rensellear Polytechnic Institue from HVCC. Please help (and motivate) me guys…I feel really lost and sad…?

It depends on the policy of your target school (RPI) as to how grades in a repeated course will be included in GPA that it will use. Of course, even if it calculates GPA with grade replacement, if it has subjective admissions reading, it will see a record of repeated courses that may not look good.

@ucbalumnus how many repeats in your opinion do not look good?