I assume "2" is referring to the number of hours.
6 miles per hour means 6 miles traveled for every 1 hour of time. If we have 2 hours, which is twice the time, then we should have twice the distance. 12 miles.
Using the standard travel formula Rate * Time = Distance we can also solve this. NOTE: the rate and the time must be in compatible formats, such as MPH and Hours. If the time is in minutes, it needs to be converted to hours in order for the answer to be accurate.
The rate is 6 MPH
The time is 2 Hours
6mph * 2hours = distance = 12 miles