Much of that had to do with holding stock in each other's company as well as sharing directors on each company's Board of Directors.
There was also a kind of 'family' relationship that developed between some lines that at first may seem to be direct competitors. Great Northern and Northern Pacific for example, could benefit from each other's cooperation along their long, isolated, single track main lines across the great northwest.
PRR held an interest in the LV as well as the N&W. While neither were direct competitors, the relationship enhanced PRR's 'reach' without violating anti-trust laws by an out-right take-over.
A bit different was PRR ownership of the LIRR as a wholly-owned but separately operated company and subsidiary. Likewise, B&O ownership of the Staten Island Rapid Transit in New York City and the B&O Chicago Terminal Railway in Illinois. Subsidiaries had certain tax and legal advantages for the parent company. Easier write-offs on one hand, minimized corporate liability in a metropolitan area on the other.
Another 'family' arrangement was the B&O/Western Maryland/Reading/Jersey Central relationship. WM and Reading between Cherry Run (on the Potomac River west of Hagerstown MD) and Allentown PA to the CNJ was an important B&O freight route to the metro NY area and New England. It avoided passage through the conjestion of Baltimore, Wilmington and Philadelphia.
There were east-west trans-continental links as well between railroad companies. B&O and Santa Fe had a relationship as did the NYC. PRR generally worked with the CNW/UP/SP set up. While this showed in the 1950s with through sleeper service, a basis existed to some extent in their freight forwarding relationships as well.
Ed Bommer