First, convert the speeds to meters per second to get 50/3 m/s and 40/3 m/s. Using the relative speed formula for opposite directions, add the speeds to get 30 m/s. Let the first train's length be L; the second train's length is L/2, making the total distance to cross 3L/2. Dividing this distance by 30 m/s gives 15 seconds, so 3L/2 equals 450, which means L is 300 meters. The total distance to cross the bridge is the train's length plus the bridge's length, which is found by multiplying the train's speed of 50/3 m/s by 51 seconds to get 850 meters. Subtracting the 300 meter train length gives a bridge length of 550 meters.