1 kilogram = 1,000 grams
The fraction (1 kilogram / 1,000 grams) is equal to ' 1 ',
because the numerator and denominator are equal.
So you could multiply your 3.42 grams by that fraction without
changing the value of the 3.42 grams.
(3.42 grams) x (1 kilogram / 1,000 grams)
= (3.42 x 1 / 1,000) x (grams - kilogram / grams)
You can cancel 'grams' out of the numerator and denominator of the unit,
and then you have
(3.42 x 1 / 1,000) kilogram
= 0.00342 kilogram .