You are planning a road trip and need to calculate the total cost of gas based on the distance to your destination. If gas costs P3.50 per gallon and your car's fuel efficiency is 25 miles per gallon, write a function to represent the total cost of gas as a function of distance traveled.