If you drive the first mile at 30 MPH and the second at 90 MPH you averaged 60 MPH ((30+90)/2). What is the math that gets "infinite speed" as the answer?
(120*30 + 40*90) / (120 + 40) = 45 MPHHowever, if you've already driven the first mile at 30 mph, it's taken you two minutes to drive it. In order to then average 60 mph over the full two miles, you'd have to travel the remaining mile in 0 seconds -- in zero time.
In your proposed solution, the first mile takes two minutes, and the second mile forty seconds. That's 2:40 to cover two miles, or an average speed of 45 MPH.
At an average of 90mph, the second mile took 40 seconds.
So your average speed was 2 miles / 160 seconds, or 45 mph.