James J. Hill, one of the C.P.R.'s biggest rivals, built this small but vital railway in some of the most treacherous country in the west.