An efficiency of nationalisation was that the Railway Clearing House was no longer needed because it was all one railway.
Before nationalisation, for freight traffic there were rules about traffic exchange points between the railways (so that one railway couldn't maximise its revenue at the expense of another), about loading/empty return of 'foreign' wagons, and a small army of number takers at exchange points - not just wagons, but sheets and wagon equipment. There were more than 1,000,000 wagons.
Presumably there were similar rules for passenger traffic. Certainly there would be calculations of the division of receipts for inter-company tickets.
All done by clerical staff calculation.
The runaway accident at Bath Green Park in 1929 is described in the official report as crashing into and destroying the RCH office in the goods yard; the clerk on duty, the "number taker", was outside to take the details of the incoming wagons, and had to run for it. An exchange point between the S&D and the LMS.
The charges for freight were on a mileage basis by the shortest route between origin and destination, with some special exceptions (eg the Forth Bridge was charged at about 8 extra miles, for both passengers and freight), but the revenue split between the companies was proportionalised by the actual route taken. The shortest route was the default, but the freight agent (alias salesman) for the originating company could negotiate a different route (though not rate). So the Midland Railway agent at Tilbury docks in 1920 with a wagon for Bristol would see that the distance, via Acton and the GWR, would be say 140 miles. That was the charge. The first 25 miles to Acton would be Midland, the rest GWR, so if the wagon charge was £20 the Midland would get (20*(25/140)), or about £3, and the GWR (20*(115/140)), or the other £17. However the Midland man could get agreement that it was to be routed via Leicester and Birmingham. No difference in charge, 220 miles to cover instead of 140, but the Midland gets to keep the whole £20. The Midland collected the original charge, then when the number takers reports came in it was all calculated along with everything else and money moved between each company. There might have even been a through daily Midland freight between Tilbury and Bristol, whereas the GWR would have no idea it was coming until it was pushed into the exchange siding at Acton, so although longer the routing could be notably quicker.
Passenger ticket money was divided on a similar basis by the RCH, but tickets were not checked at each border, there was just a general agreement between the companies about likely routes.
Oh for a computer. This is what TOPS, originally done for the Southern Pacific railway in the USA, did as a pioneering computer system. Where is every wagon, which way is it going, what was charged, and how do we split it. Although generally thought as an operational system, it was the revenue attribution which really drove it. The US has also developed trackside readers called Automatic Car Identification which did away with number takers.