To jailbreak iPhone 3GS old and new bootrom, just follow the guide posted here (iPhone 4 jailbreak guide)Â with the below little changes.
Download iOS 4.3.1 for iPhone 3GS
Download iTunes 10.2.1
Download PwnageTool 4.2
Download Universal Ramdisk Fixer
Download iOS 4.3.1 PwnageTool Bundle for iPhone 3GS (Old Bootrom)
Download iOS 4.3.1 PwnageTool Bundle for iPhone 3GS (New Bootrom)
[via RedmondPie]