In this video from sjsharksipodtouch, he teaches us how to jailbreak and unlock your iPhone 3G and iPhone 2G. First make sure you are on firmware 3.0 or 3.0.1. Also make sure you are using iTunes 9 or higher. Then download a custom restore file from the video description, put iPhone into recovery mode, click shift on restore, and select the custom firmware. This will take 10 minutes until it's done restoring. Now the iPhone should be jailbroken and unlocked with Cydia installed. Then he installs a T-mobile SIM card to complete the process of unlocking the iPhone.