As you notice, 1 apple costs $2
therefore, 2 apples will cost $4
and 3 apples will cost $6
Let x be the number of apples

where a is a constant number.
Substitute x = 1 and f(x) = 2

And you will get a = 2
So the function will be :

The answer is Choice D f(x) = 2x