This is a railroad laid in the form of a triangle. There is an extension upto 15ft on the left side and 10 ft on the right. The bottom rail is endless. The Engine (E) is 15ft long and the 2 coaches (A & B) are each of 10ft.
Now we need to bring coach A to the position of coach B and vice versa and the engine back to its original position.
See pic attached...