Understand for the first several years of their life, Paypal was separate from Ebay.
Now, as to how to invest in an IPO. Very difficult. The shares are placed with an investment bank that then spreads them through a syndicate. They banks in the syndicate then allocate shares. The shares to be sold at the IPO price are typically going to go to very large investors, institutional investors and others whom the syndicate members choose. But the only way they go to small individual investors is if the preferred investors don't want them all.
So then the stock opens on the market. Now, you as an individual want some. Let's take the case where the stock goes up which is normal for the first day. If you put in a purchase order at market then you pay more than the IPO price. If you put in a purchase order at or around the IPO price, you don't get shares.
If the stock goes down and you put in around the IPO price then you get some shares at the price of the other initial investors but they end the day worth less. If you put in at market you still likely pay more than the low point for the day. But who wants stock in a company that drops the first day?