Let SA = Speed of Train A and SB = Speed of Train B.
Let DA be Distance that Train A travels and DB = Distance of Train B
DA = 3SA + (SA)t at time = 0 (8pm), the distance of Train A is 3 hrs x SA mph
BB = (SA + 90)t at 8pm, the distance of Train B = 0
Set the distances (DA=DB) equal and let t = 2 (from 8pm to 10pm) and you get SA = 60 and SB = 150