The specifics probably weren't in his plan, but in various interviews he's talked about the consumption of energy (vehicles) and the generation of energy (solar) as being two sides of the same coin. Elon is the one that told his cousins to start a solar company after all.
IIRC he originally saw three major fields to move forward on: the Internet, Transportation/Energy, and Space. By the sounds of it he was thinking of these as early as high school, to at the latest some time after he sold his first company (Zip2). He did the Internet thing pretty well, now he's working on the other two. This is someone who does think on these scales. Keep in mind, as the article itself points out, that you're an idiot if you think starting a car company is a good idea. Energy was the whole point all along. A company for its own sake isn't in Elon's DNA. That would probably just be too boring for him.
Whether this specific merger is a good idea or not is a different question. And I also don't think the emergence of cheap supercomputers in the form of geek-subsidized graphics cards and their applicability to a particularly effective machine learning genre would have been predicted by anyone.