Finding the cost of gas using a proportion