Step 1: Set up the relative speed equation.
The relative speed of the trains moving towards each other is \( 50 + 55 = 105 \) km/hr.
Step 2: Calculate the distance traveled by each train when they meet.
If \( x \) is the distance covered by the train from R, then \( x + 20 \) is the distance covered by the train from S.
Since they are moving towards each other, their combined distance is the total distance between the stations:
\[
x + (x + 20) = 440
\]
\[
2x = 420
\]
\[
x = 210
\]
The total distance is \( 210 + 230 = 440 \text{ km}\).