A general question:

if a train goes north at x m/s with a weight of xxxx, and another train goes west at x m/s with a weight of xxxx, they collide and couple together, what direction will they be gonig and at what velocity.

how would you solve this question? thanks.

I have no idea why you are using 4 x's to represent a weight. It appears that the two trains have the same speed and weight.

If that is the case, conservation of momentum will tell you that the final direction is northwest at V = sqrt 2 * x