Apple executives are considering buying startup Perplexity AI to offset the loss of the company’s arrangement with Google.