Here we're dealing with a "composite function," where the input to one function (g) is another function (f).
Given that g(x) = x + 2. We need to find the value of this function when the input is the other function: f(x) = (1/2)x + 1. Making these substitutions, we get g(f(x)) = [(1/2)x + 1] + 2.
The selling price of 10 hats is now found by replacing x with 10:
g(f(10)) = [(1/2){10} + 1] + 2
= [5+1] + 2 = 6 + 2 = 8 cost units (answer)