To find the answer, you just need to divide the amount of miles by the amount of gallons. Notice how mi/gal has the "/" or division symbol in it. For example, 15 mi/gal would mean that there are 15 miles per gallon. So one gallon will get you 15 miles.
All you need to find here is the amount of miles per gallon, which is simple. There are 324 miles, and 12 gallons. So, there are 324 miles per 12 gallons. Now, to make it per one gallon, you divide by 12. 12/12 is 1, so it's a single gallon. 324/12 is 27, so there are 27 miles.
There's your answer, 27 miles every single gallon, or 27 mi/gal