Donald Trump bought up to $50,000 worth and sold up to $15,000 of shares in Elon Musk’s SpaceX in July,his latest stock buy involving a government contractor.