A car went from Boston to New York at a speed of 40 mph. On the way back from New York to Boston the speed was 56 mph. Because of the speed difference, the time of the second trip was 2 hours less than it was the first time. What was the time of the trip from Boston to New York?