This is a standard deal that accompanies a no holds barred challenge of the boldest and bravest sort. To follow up a dispute, bet, or challenge with a promise of "I'll change my name", betrays utter disbelief in the claim or proposal that has just surfaced, with the understanding being that if such claim is in fact backed up, proved true, or achieves a successful outcome, the challenger will actually and officially change his or her name.
Come to think of it, the strength behind the deal most likely lies in the pain it would actually take to change ones name via the local legal system, with reams of stamp paper passing through the hands of hoards of court clerks under the auspices of significant quantities of bakshish.
Sudhanshu: Dai, did you hear that Priya is getting hitched to that professor from Pilani
Ramgopal: Magga, if Priya agrees to go live in Rajasthan no... I swear I'll change my name.
Sudhanshu: Better change both your names...