i think there is a way to make a custom firmware - search it on google. there would be all your apps and other things. and for your contacts and settings you can just sync.
hope it helps
Ok, for your jailbroken apps I suggest getting something like app backup or pkgbackup, or if you have rock just back it up under your acc. Then for the regular apps and settings etc, make a backup on your iTunes, it probably has one right now. So once it backs up, plug in your iPhone 3g, right click on the name on the left side (where theres the drop arrow showing playlist under your iPhones name) and click restore from backup, and it shows the iPhone 2g backup and restore. Then just jailbreak it and redownload appbackup or pkgbackup and run it and you should get the original jailbreak apps back, and your iPhone should be under the same settings as your iPhone 2g. I'm not 100% sure this will work, but it is what I did when I switched my phone from a 3g to a 3gs then to a iPhone 4. Good Luck!