You'll need to add the APN settings for the network you want to use.
Connecting the handset to iTunes with the T-Mobile SIM in should force through a Carrier Bundle update which will solve your issue.
If not, you MAY be able to goto Settings-General-Network-Cellular Data Network and add the relevant settings there. You can find these by searching for T-Mobile iPhone APN Settings on the net.
One issue you might have is when using an Orange SIM the Cellular Data option is removed as park of the Orange carrier bundle. This should default to the T-Mobile option but as i've never tried to I don't know what that is.