Revenue from fares and assignment of equipment were separate issues.
Allocation of revenue from through fares involving several railroads would theoretically be agreed upon by the participating railroads; if they were unable to agree, as was usually the case, they would bring the matter before the Interstate Commerce Commission (ICC), which would make the final decision after an administrative proceeding involving many months and many lawyers. The originating carrier issued a through ticket having a coupon for -- in most cases -- each railroad participating in the route (there's a thread on those tickets on here somewhere, but I can't remember on which forum). Each coupon would be collected ("lifted" in railspeak) by the conductor of each railroad involved, for which each railroad would receive its share from the originating railroad, which had collected the total cost of the ticket from the passenger. The matter of interline divisions was a whole subset of railroad accounting, and if you have a chance to look through an Official Guide from prior to 1960 or so you'll see listed among the officers of the major railroads a Manager, Divisions or some such who headed a whole department devoted to keeping track of all that.
In general, space in coaches (if reservations were even required) was assigned regardless of equipment ownership, although some assignments might be determined by the passenger's origin and destination. Pullman space was assigned by railroad employees as directed by the Pullman Company, which owned the cars (until later years, and let's not get into that just now) and staffed them with its own employees. In the case of prestige trains in demand by industrial traffic managers who controlled the routing of valuable freight movements, a certain number of bedrooms, compartments, or drawing rooms might be held off sale to enable the railroad controlling the assignments to accommodate last-minute VIPs. Generally, a railroad owning a particular car would be compensated by each railroad over which the car traveled (specifically whichever railroad had it at midnight each day).
Individual railroads could make mutual arrangements -- for example, the PRR and New Haven ran four daily trains between Washington and Boston: the Colonial and the Patriot had mostly NH equipment, while the Senator and the Federal had mostly PRR, and they may have had their own bilateral agreement; the dining- and club car on-board employees worked through and were paid by their respective employers, who I believe received all the revenue from meals and refreshments served, regardless of where the train was when the check was paid. As far as I know the same situation prevailed on trains such as the City of San Francisco and the California Zephyr, where six trainsets were required, with a dining car provided by one railroad on today's departure and another on tomorrow's, etc.