Read your damn history.
SpaceX is basically 100% Elon's creation. He was founder, Tom Mueller (who designed the Merlin rocket engine) was the first employee period
Tesla was Elon and a few other people who had seen a good electric roadster, but it had been a one-off that that company was not going to produce. They decided they wanted to produce an electric roadster, so they did.
Initially, Martin Eberhard was in charge of the company and Elon was just an investor. Search archive.org for the original Tesla blog. It's all laid out. I know this because I was following them while it was happening.
Eberhard was in charge, and they were going for a setup with a two-speed gearbox. There was to be no clutch, just a synchromesh to allow shifting.
Problem is, shifting at 10,000+ RPM under heavy load is mechanically stressful, and they were having a lot of trouble getting the gearbox to work reliably.
After a good year of screwing with this, they were burning through cash and not getting close to actually shipping a car. That's when Elon stepped in, pushed Eberhard out, and took over Tesla. Elon quickly switched to a setup with a single speed non-shifting gearbox (much easier to build, much less expensive, and will basically last forever as long as you lubricate it) and a larger and better cooled electric motor to deliver the required torque that they wouldn't get from a lower speed gear. That setup is still in use today in all Teslas.