When going to the beach, Guilherme takes 2 hours on the road to go from his city to the beach and 3 hours to get back to his city. Knowing that Guilherme's car goes at 100 km/h when downhill, 80 km/h on plane surfaces and 60 km/h uphill, and that there are only 8 kilometers of road on plane surface, what is the distance in kilometers between the city and the beach?
8 Km at 80 Km/hr takes 1/10 hours;
x Km at 100 Km/hr takes x/100 hours;
y km at 60 km/hr takes y/60 hours;
in one direction the sum of these is 2 hours, so 1/10 + x/100 + y/60 = 2. In the other direction , however, whatever was uphill becomes downhill and whatever was downhill becomes uphill; so the roles of x and y changes and we get the equation
1/10 + x/60 +y/100 =3. These equations can be simplified to get
6x + 10y = 1140
6y + 10x = 1740
the solution is x=165 km, and y = 15 km. so the total distance is 165 + 15 + 8 = 188 km.