A real estate firm has sold a 6,600-square-foot office and residential building outside Princeton, in a newly completed transaction by NAI Fennelly.