Of course the problem may be solved within Newtonian mechanics quite trivially, by realizing that the only way the segment can remain (a) horizontal and (b) of fixed length is if the initial conditions are y_{A}(0)=y_{B}(0), v_{A,x}(0)=v_{B,x}(0) and v_{A,y}(0)=v_{B,y}(0).

Therefore it doesn't make sense demanding that the segment can satisfy conditions (a) and (b) if the initial conditions are different. It suffices to write Newton's equations along x and y for the two particles to show this.

Then Newton's equations ensure that y_{A}(t)=y_{B}(t) and that |x_{A}(t)-x_{B}(t)|=|x_{A}(0)-x_{B}(0)| which every first year student learns in the first few weeks.

Newton's equations, also, imply that a Galilean transformation along x is consistent with these relations, since the force along x is zero...

And the statement that the vertical distance could change is, just, wrong. There's just no way it could change; it can be shown to be a constant of motion, by writing the equation satisfied by the relative distance, y_{A}(t)-y_{B}(t), namely d^{2}(y_{A}(t)-y_{B}(t))/dt^{2}=0, since the acceleration is constant along y and the same for both particles-and both particles are assumed to have the same initial velocity along y.

In fact it's, also, trivial to see from Newton's equations, that, if the two particles are subject to the same force along x, the segment will remain horizontal and of fixed length; it will just be accelerating along x. Motion along x is independent of motion along y...

The equation for y_{A}(t)-y_{B}(t) isn't invariant under transformations to a non-inertial frame; in Newtonian mechanics these would be transformations of time that aren't linear functions of time. But that's no surprise. (And Lorentz transformations are transformations that are linear in the coordinates.)