distance the slug travels = D-X = Vt
distance the snail travels = D = 2V(t-T)
time for the snail to finish = t-T = D/2V = (Vt+X)/2V
Starting out with these possibilities,
D = 2,4,6,8,or 10 and
V = 1,2,4,or 5
All can be eliminated except for D=10 and V=1
with t,X,T = 8,2,3 or t,X,T = 7,3,2
In either case, t-T = 5 sec