A cyclist travels for X hours at 5km/h and for Y hours at 10km/h. He travels 35km altogether and his average speed is 7km/h. Find X and Y.

wrong again.

2 hours at 5 km/h and for 3 hours at 10 km/h yields
10+30 = 40km

Try 3 hours at 5 km/h and for 2 hours at 10 km/h

Let's try again with:

- X = 3 hours at 5 km/h
- Y = 2 hours at 10 km/h

Total distance covered at 5 km/h = 5 km/h * 3 hours = 15 km
Total distance covered at 10 km/h = 10 km/h * 2 hours = 20 km

Total distance covered = 15 km + 20 km = 35 km

The total time taken for the journey:
X + Y = 3 hours + 2 hours = 5 hours

The average speed for the entire journey:
Total distance / Total time = 35 km / 5 hours = 7 km/h

Therefore, the cyclist traveled for 3 hours at 5 km/h and for 2 hours at 10 km/h to cover a total distance of 35 km with an average speed of 7 km/h.

Let's first establish the total time taken for the journey:

Total distance = 35 km
Total time = X hours + Y hours

We know that:
Distance = Speed x Time

For the first part of the journey at 5 km/h, the distance covered is:
5X

For the second part of the journey at 10 km/h, the distance covered is:
10Y

Given that the total distance covered is 35 km:
5X + 10Y = 35

We are also given that the average speed for the entire journey is 7 km/h:
Total distance / Total time = 7
35 / (X + Y) = 7
X + Y = 5

We now have a system of two equations:
5X + 10Y = 35
X + Y = 5

Solving these two equations simultaneously, we get:
X = 2 hours
Y = 3 hours

Therefore, the cyclist traveled for 2 hours at 5 km/h and for 3 hours at 10 km/h.