Boil the sugar in a small amount of water (just in case there's anything nasty in the sugar). Let the sugar cool. Sanitize the barrel, add the sugar, rack the beer onto the sugar solution. There's no need to stir it as the yeast will find the sugar and work their magic. The 50 g figure is assuming you have 5 US gallons (19 liters) of beer.