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.