Artificial intelligence has been a game changer for both companies. But which one is the better long-term bet?