I agree that it would definitely cost the 5000xp to keep the Big T down, but the caster would be compensated enough to make it worthwhile. Fighting a Tarrasque is rarely (if ever) a random encounter and would, therefore, denote a hefty role-playing (or story-based) XP award. The caster may have a less impressive xp total as the rest of the party, but if you're tossing around Miracles, you can easily gain enough solo xp to make up for this loss.
Either way...just my 2 cp
Either way...just my 2 cp