Will it be safe to jailbreak my iPhone 3Gs?
'Safe' is a broad term. If you keep a backup though, there's not much that can go wrong as you can always restore that backup. In addition, as there are no updates available for the 3Gs, you can safely restore to a jailbreakable version of iOS if anything goes wrong.

As the last version of iOS that can be installed on the iPhone 3Gs is iOS 6.1.6, this can be jailbroken using p0sixspwn. Download it, then follow the instructions.