A candy store sells almonds for $18 per kilogram and peanuts for $8 per kilogram. If it sells 20 kilograms of mixed nuts for $10 per kilogram, how many kilograms of almonds are in the mixed nuts?

consider the value of each part of the mix.

18x + 8(20-x) = 10(20)