Answer :

The correct answer would be: 24 apples. 
6 apples would cost = $12
9 apples would cost = $18

so 3 apples=6 dollars
therefor if we divide both sides by 3
1 apple=2 dollares

so therfor for every 1 apple, you pay 2 dollars

so if 12 apples
12 times 2=24
24 dollars

anonther way is
3 apples=6 dollars
6 apples=12 dollars
9 apples= 18 dollars
12 apples= 24 dollars