Total quantity of flour = 5 kg 500 g

Amount of flour used for cake = 3 kg 300 g

The quantity of flour left is, 5 kg 500 g - 3 kg 300 g = 2 kg 200 g

Total quantity of sugar = 3 kg 250 g

Amount of sugar used for cake = 2 kg 100 g

The quantity of sugar left is, 3 kg 250 g - 2 kg 100 g = 1 kg 150 g

∴

The amount of flour and sugar left is 2 kg 200 g and 1 kg 150 g respectively.