Panasonic Corp. agreed to help set up the battery factory that Tesla Motors Inc. Chairman Elon Musk needs to sell more electric cars, without settling its share of the investment costs.