Relatively easy to have 2 separate brands from same company.
It's relatively easy in a complimentary relationship like Air France and KLM or BA and Iberia, with service levels in the same ballpark. However stepping off a decent long haul experience onto a bright yellow Ryanair B737-800 with a charmless crew and buy on board is far from a seamless transfer. I cannot think of any company(s) where this works well today. Even with BA and American, people get hacked off when they end up flying on a rubbish American B767 when they booked a BA flight, only to discover it's a codeshare. Once bitten twice shy...