Answer :

1 kg = 1000 g

You can set it up as a proportion:
(1000g below is the measure of 1 kg.)
1000g/$6 = 400g/x
Find x.
Cross multiply:
x=(400*6)/1000= 2400/1000
x=2.4
It costs $2.40 to buy 400g of flour.