There is a lot of financial engineering that goes into situations like this and you have to look into it on a case by case basis. But often times investing in spinoff companies can be very profitable. In fact spinoff companies outperform the overall stock market - you can checkout the Bloomberg Spinoff Index.
The book How to be a Stock Market Genius covers situations like this and gives some tools to analyze them if you are interested in learning more about it.