In this question, the bus had traveled 4 parts of the distance which equal to 12 miles. If you put it into an equation it will become 4 parts = 12 miles 1 parts = 12miles/4= 3 miles
The total distance of town A to town B is 8 parts. So, the total distance in miles would be: 8 parts * 3miles/part= 24 miles