What follows here is an answer entirely uninfluenced by other answers. I have created it entirely from the initial problem statement.
Let there be four worldlines: $A_f$ for the front of the first train, $A_r$ for the rear of the first train. $B_f$ for the front of the second train, $B_r$ for the rear of the second train.
These worldlines can be parameterized as follows.
$$\begin{align*} A_f(\tau) &= u_A \tau \\ B_f(\tau) &= u_B \tau \end{align*}$$
$u_A$ and $u_B$ are four-velocities. Here, we assume that at $\tau = 0$, the fronts of the two trains are coincident at the origin.
What we want to do now is figure out where the proper locations for the rears of the train should be. Without loss of generality, we can set these locations to be some distance $d$. We can, through an orthonormalization procedure, find the spacelike vectors that go along the trains' lengths. My background is in the clifford spacetime algebra, where we would represent this quantity as $iu$. Hence, the other two worldlines are:
$$\begin{align*} A_r(\tau) &= (\tau - di) u_A \\ B_r(\tau) &= (\tau + di) u_B \end{align*}$$
Choosing minus for the A train ensures that the rear of the train is further down the -x-axis than the front. It should be noted that then the $A_r, A_f$ worldlines are described by $\tau$, the proper time of the A train. Similarly for the B worldlines; these proper times are different between the trains, of course.
Now, we should be able to compute the intersection by saying $A_r(\tau_A) = B_r(\tau_B)$ for two different proper time intervals $\tau_A, \tau_B$. There are two vector components, so the system is well-described.
Now, for simplicity, we choose $u_A = e_t$, the time basis vector. Thus, we choose a frame where the A train stays still and B moves past, from right to left. $u_B = \gamma(e_t - \beta e_x)$ then, and $i u_B = \gamma(e_x - \beta e_t)$. The equations look like
$$\begin{align*}\tau_A &= \gamma \tau_B - \gamma \beta d \\ - d &= -\gamma \beta \tau_B + \gamma d \end{align*}$$
These equations are easily solved. At first glance, the solution appears to be
$$\begin{align*} \tau_B &= \frac{(\gamma + 1) d}{\gamma \beta} \\ \tau_A &= \frac{(\gamma + 1) d}{\beta} - \gamma \beta d \end{align*}$$
But a little mathematical manipulation (in particular, using $\gamma = (1-\beta^2)^{-1/2}$), proves them to be the same.
$$\begin{align*} \tau_A &= \frac{d(1+\gamma) - \beta^2 d \gamma}{\beta} \\ &= \frac{d(1 + \gamma[1-\beta^2])}{\beta} \\ &= \frac{d(1+1/\gamma)}{\beta}\\ &= \frac{d(\gamma + 1)}{\gamma \beta}\end{align*}$$
In short, then,
1) There is nothing wrong with the experimental setup.
2) As expected by symmetry of the problem (each train should measure the relative velocity of the other to be the same), the time delays measured by each train are the same, and they can be calculated according to the above calculation.