Investors race to buy shares in both companies on their first day of trading on the US stock market