Let the original speeds of the two identical trains be v1 and v2. The distance needed to pass each other in opposite directions is d = 3(v1 + v2). When one train's speed is increased by 50 percent, the new relative speed is v1 + 1.5v2, allowing us to write the equation 3(v1 + v2) = 2.5(v1 + 1.5v2). Simplifying this yields 3v1 + 3v2 = 2.5v1 + 3.75v2, which reduces to 0.5v1 = 0.75v2, meaning v1 = 1.5v2. Substituting this ratio into the original distance equation gives 3(1.5v2 + v2) = 7.5v2. When moving in the same direction, their relative speed is v1 - v2 = 1.5v2 - v2 = 0.5v2. The time to pass each other is the distance divided by the relative speed, 7.5v2 / 0.5v2 = 15 seconds.