Donor pays the tax

I do not understand why the size of the partial gift credit equals the size of the gift times TgTe when Tg is not equal to Te. Instead, I obtain the formula Te - Tg + TgTe.