This is a simple proportion: 9 kcal / 1 g = x / 12 g.
Then, you can solve for x.
x = 12 g * 9 kcal / 1 g = 108 kcal.
This is, the number of kcal is found by multiplying the number of grams of the sample of cooking oil times the unit energy value of this fat.
Answer: 108 kcal