1kg = 1000g so 3kg= 3000g
if 3000g of sweets costs £12.99 then 1g of sweets should be 12.99/3000 pounds. the answer is 0.00433 pounds which is 433/1000* of a penny (or 0.433 pence) per gram of sweets.
* this fraction cant be simplified further because 433 is prime.
and also i live in a country that uses euros and cents but for your convenience i am using pounds and pence ;)