How to unlock a iphone 4s verizon to work with tmobile?

Im thinking about buying a iphone from a friend but im not sure how to unlock it

Use the code

You don't. They work on completely different types of networks anyway.

I had the same problem i just went to unlockatt.com im sure they'll help you out

Not possible

It is no possible sorry.

Since, the iPhone 4S is capable of both, GSM and CDMA, you can unlock it very easy with a custom gevey SIM.

Yes you can, with a unlock sim ill recommend going with the Gevey ultra s Gsm + Cdma since it's more reliable but there are other options as the R-Sim 2, once the phone is unlocked it is able to be used with any sim card world wide but the only downfall is you must be jailbroken.
T-mobile provides instructions for this. First, though, you have to unlock it using software. That's easy. Just google for unlock Iphone 4s. BUT, You will not be able to use 3G on t-mobile because the Iphone's reception is not made for t-mobile. You will only be able to use 2G. AND, you will not be able to use any WIFI.
Since the ATT deal fell through and they got money and spectrum from ATT because of that, they will change their network soon, which will enable people to use the 4G even if the Iphone isn't made for t-mobile's requirements.