First of all, you have to be at the emergency screen.
1. Plug your iPhone into iTunes with no sim card.
2. Put the T-Mobile or another carrier that's not AT&T in the iPhone
3. It should say it's not compatible or it doesn't work with the iPhone.
4. Plug the iPhone out.
5. Switch the T-Mobile sim card with the O2 sim card.
6. Plug the iPhone back in to iTunes.
7. Wait, and it should activate asking for activation,
8. Use jailbreakme.com to JB + Unlock
*NOTE* You can just buy the O2 sim card and use it, no need to call them or anything.