You can
put this solution on YOUR website!speed = distance/time
TRAIN1:
30 = x/t
TRAIN2:
45 = x/(t-2)
Train1 sets off and then train2 leaves 2 hours later. When they meet, their distance travelled will be the same, but train2 will have taken 2 hours less to get there. This is what the 2 equations say.
You need to remove x from both equations to find t and then you can find x too.
jon.