The easiest way, (and safest) to carbonate root beer, is to use dry ice.
Use it in a cooled liquid, and do NOT cap it up. If your root beer is cool enough, enough Co2 will dissolve to carbonate properly. The root beer needs to be almost at freezing, to work properly.
You can also force carbonate, in a keg. (If you have the equipment.)