Q:

I keep getting NaN and i can't find out how to fix it

It happens when it gets to cost2. I think the problem might be in trying to define price2, everything else works fine. I'm new to JavaScript so I'm sure it's a simple mistake, but any help would great!
<html>
    <body>
        <h1>Gas Mileage</h1><br></br>
    </body>
    <script type="text/javascript">
        var mpg, price1, distance, gallons, cost1, price2, cost2;

        mpg = prompt("Enter your car's miles per gallon");
        document.write("Your car gets "+mpg+" miles per gallon.");
        document.write("<br>");

        price1 = prompt("Enter the current cost of gas");
        document.write("Gas currently costs $"+price1+" per gallon.");
        document.write("<br>");

        distance = prompt("Enter the amount of miles you would like to travel");
        gallons = distance/mpg;
        cost1 = gallons*price1;
        document.write("To travel "+distance+" miles, it will cost you $"+cost1);
        document.write("<br>");

        price2 = (0.1+price1);
        cost2 = gallons*price2;
        document.write("But if gas were to cost 10 cents more per gallon, it would cost you $"+cost2);

    </script>
</html>

A:

prompt always returns a string.
If you want to use that input in calculations, you're going to have to use parseInt or parseFloat:
var answer1 = parseInt(prompt("Question 1"));
var answer2 = parseFloat(prompt("Question 2"));

That said, the division and multiplication operators will coerce it's parameters to numbers.
The problem occurs when this coercion doesn't work: price2 = (0.1+price1);
There, because the + will just concatenate the 2 parameters as string, price2 can be a string like "0.11.54" if price1 is "1.54".
Trying to multiply any number with an invalid number like that results in NaN.
Converting the user input from string to number solves that issue, since the + can then add the two numbers together, instead of concatenating them.

