What to do before root and flash my phone?
You should flash the ROM first, unless you need root in order to flash it.  (You can flash via Odin without root, but you need ROM Manager, which needs root, or something to flash if you don't use Odin).  When you flash a ROM that's rooted, your device will be rooted; if the ROM is not rooted, the device will not be rooted.
You need root to make a full backup.  See How to backup an Android device?
If you root first, you can install a custom recovery (e.g. ClockworkMOD, via ROM Manager) that will let you create a Nandroid backup of the full ROM.  That said, with a Samsung device you don't need to do this.  You can use a tool called Odin to reflash the original firmware as long as you've found it for download somewhere.


If you need more details on anything I've mentioned, I suggest searching first -- we have lots of questions on rooting, backups, Nandroid / Clockwork / ROM Manager, and Odin.  See also How do I root my Android device?, which has some info on considerations and things you can do before rooting.