my guess would be the first train laid down going up that hill. (laiddown meaning that train lost all momentum and could not go any further) i would bet that second set of locomotives is another train giving it a push up the hill . I know at the UP we call that DP (distributed power ) and its done by a remote box on the head unit that controls the trailing unit on the end of the train .