Its not legal anywhere. A publicly traded company is not your property. Its a legal entity.
You cannot exchange any value between two just because you are majority owner of both. Otherwise elon with 51% could start Zesla (own 100% of it) and transfer all assets from Tesla to Zesla.