Alvin can go upstream at a rate of 6 miles per hour and downstream at a rate of 12 miles per hour. One day while Alvin was on the river, he received a call telling him he needs to turn around and come home. So he turned around and went back to his starting point. If his entire trip took 12 hours, how far did he travel on the river?

since time = distance/speed,

d/12 + d/6 = 12

To solve this problem, we can break it down into two parts: Alvin's upstream journey and his downstream journey. Let's assume the distance he traveled upstream and downstream is "d" miles.

First, let's calculate the time Alvin spent on his upstream journey. We know that the rate at which he travels upstream is 6 miles per hour. Therefore, using the formula Time = Distance / Rate, we can write:

Time upstream = d / 6 (hours)

Next, let's calculate the time Alvin spent on his downstream journey. We know that the rate at which he travels downstream is 12 miles per hour. So, using the same formula:

Time downstream = d / 12 (hours)

According to the problem, the total trip took 12 hours. Therefore, we can write the equation:

Time upstream + Time downstream = 12 hours

Substituting the values we calculated earlier:

d / 6 + d / 12 = 12

Now, let's simplify the equation:

2d + d = 72

3d = 72

d = 24

Therefore, Alvin traveled a distance of 24 miles on the river.