Blake Lively and Justin Baldoni have agreed to settle their legal battle over the film “It Ends With Us” just two weeks before trial.