We are asked to solve for the percent that customers in the store will buy hats.
We let "x" equal to the number of people who went to the store.
When 40% of this buy from the store or purchase items, we have:
40% x X = 0.4X
When 15% of the 40% bought hats, we have:
15% x 0.4X = 0.06X -> 6% of X
Therefore, the answer is 6% of the total population who come to the store will buy hats.