A train covered the distance of 400 km between A and B at a certain speed. On the way back it covered 2/5 of the distance at that same speed and then it decreased its speed by 20 km/hour. Find the speed of the train at the end of its journey from B back to A, if the entire trip took 11 hours.

To find the speed of the train at the end of its journey from B back to A, we need to break down the information given into smaller steps.

Step 1: Calculate the time taken for the train to go from A to B.
Let's assume the speed of the train when traveling from A to B is 's' km/hour.
Since time = distance / speed, the time taken to cover the distance of 400 km from A to B is 400 / s.

Step 2: Calculate the time taken for the train to return from B to A.
The train covered 2/5 of the distance (2/5 * 400 km = 160 km) on the way back at the same speed 's'. So, the time taken for this part is 160 / s.
The train then decreased its speed by 20 km/hour. Let's call the reduced speed 'r'. The rest of the distance (400 km - 160 km = 240 km) is covered at this reduced speed 'r'. So, the time taken for this part is 240 / r.

Step 3: Calculate the total time for the entire trip.
The total time taken for the trip from B back to A is the sum of the times calculated in steps 1 and 2. So, the total time is: 160 / s + 240 / r.

Step 4: Use the given information to find the speed at the end of the journey.
The question states that the entire trip took 11 hours. So, the total time calculated in step 3 must be equal to 11 hours:
160 / s + 240 / r = 11.

Now, we have an equation with two variables (s and r). To solve this equation and find the values of s and r, we need another equation.

The question also tells us that the train decreased its speed by 20 km/hour. This means the reduced speed 'r' is 20 km/hour less than the initial speed 's':
r = s - 20.

Now, we can substitute the value of 'r' from the second equation into the first equation to find the value of 's' (the speed of the train at the end of its journey).

160 / s + 240 / (s - 20) = 11.

Solving this equation will give us the value of 's'.