My first guess is that he doesn't have the correct APN settings put in for his carrier.
You should let everyone know if the device is a stock rom, or another rom. Since the stock AT&T rom should not have the APN settings for Tmobile, but something like CM's rom should.
Worst case he should just need to enter the APN settings by hand, which isn't too hard to do. Other then that he could be in an area where Tmobile uses different bands for data then the AT&T version supports... that part I don't know how much it effects the AT&T G2, but has effected older devices going between AT&T and Tmobile.