Let Vs be the velocity of the slower train, and Vf is that of the fast train.
The first statement leads you to
b/Vs - b/Vf = a. Or
1/Vf - 1/Vs = a/b .....(1)
The second statement leads you to
Vf*c - Vf*c = 1 km Or
Vf - Vs = 1/c .........(2)
Vf = Vs + 1/c
Substitute this value of Vf in equation (1) and solve the quadratic to find Vs.