The question for the justices was whether an agency had complied with a federal law by issuing a 3,600-page report on the impact of a proposed railway in Utah.