I added 40 mL of NaOH 1N to rise the pH of 10g teriphitalic acid from 5.3 to 6.3, so if I adde the same 40 mL of NaOH to 12g of the same acid what is the new pH will I have?

Wouldn't that be the same as adding 2 grams of acid to the original solution?

so you add 1/5 more acid (2/10), you ought to change lets see...
1/5 (H change)=1/5(10^-5.3 - 10^-6.3)
= 1/5(5E-6 - .05E-6)=1/5 (4.5E-6)
= 0.9E-6 hydrogen concentration change, it goes more acid to...

Hconc= 10^-6.3+.9E-6=1.4E-6
pH final= 5.85
check my work