A building on Route 9 in Westborough, which is the site of two restaurants, has sold for $3.95 million.