Nancy had some cookies. She packed the cookies equally into packets of 1/5 kg each. If she packs them equally into packets of 1/8 kg each, she will get 12 more packets of cookies. Given that the total mass of the cookies is a whole number, how many kilograms of cookies did she have?

n * 1/5 = (n+12) * 1/8

n / 5 = n/8 + 12/8
8 n/40 = 5 n/40 + 60 /40
3 n/40 = 60/40
n = 20 or any multiple of 20 cookies

if 20 gives mass = 20 * 1/5 = 4 kg and 32 * 1/8 =4 kg