For the gas you can do simple division of
$20/2.12(cost per liter) to get 9.43 liters and it’s asking for nearest so round down to 9 liters.
For the next problem if we know each pencil is .15 then we can do (.15)(x)=5 and then after dividing Both sides by .15 you get X = 33.33 which is roughly about 33(rounded)