It is asking (ignoring all the irrelevant rubbish about hills and such) that you (or your car, or both of you) achieve an **average** velocity of 30 mph over the 2-mile distance.
To travel 2 miles at a velocity of 30 mph will require 4 minutes, whether uphill or down, or swimming through goo or whatever other nonsensical extraneous condition as to your mode of travel may be applicable. Velocity is velocity, ok?
If you travel the first mile at a velocity of only 15 mph, that first mile will -- guess what? -- require 4 minutes to traverse. Thus, to achieve an average velocity of 30 mph over the 2 mile trip, you will have precisely ZERO time left to travel the second mile and your velocity must therefore be "infinite" (which is an idiotic proposition on its face).
Contrary to your post, there is indeed a time factor mentioned in the problem, to wit, the problem's usage of VELOCITY, which is by definition DISTANCE PER UNIT OF TIME.
Got it now, mate?
Time is not the issue.
Answer this riddle:
If you go 15mph for 1 mile and 45mph for 1 mile, what is your average SPEED in MPH for the two mile trip ?