Chelsea have scored twice after halftime to win a London derby against West Ham, which returns them to the top four in the Premier League.