The office building 417 Fifth Avenue, purchased by the Moinian Group and Goldman Sachs for $250 million three years ago, is in contract to a foreign buyer for $140 million, a report released yesterday by Cushman & Wakefield said. The 408,000-square-foot building is 96 percent leased, but 25 percent of the leases expire in the next two years, the first quarter 2010 New York Capital Markets Group report said. The sale price would equate to $343 per square foot, a staggering loss for the buyers. Cushman, which represented the seller, declined to comment. Goldman Sachs did not immediately respond to a request for comment.