Tigershark: Yes, if X has lots of shares in Y and Z, then when you buy out X you get those shares in Y and Z "for free". It's not really free, though, because the price you pay to buy out X includes consideration of the value of X's shares in Y and Z.
Actually, now that I think about it... those shares are not free, but they are dirt cheap. Because of the odd way that stock valuation works, you're only paying about a tenth of the actual price of the Y and Z shares when you buy them indirectly through buying out X. Actually, it's around three tenths once you factor in the stock price multipliers for the last shares and the lump-sum final block. Even so, it's a great deal.
So, yeah. Buy out companies that have lots of stock in other companies.
You definitely don't want to do it the other way around. Avoid buying companies where some other company has lots of stock, because when you do you'll be handing that other company a huge pile of your cash.