Assumptions -
speed of train x
speed of cat y
distance of train from the tunnel d
Length of tunnel is 8l (for calculation simplicity)
so as per 1st condition
d/x = 3l/y
as per 2nd condition
(d+8l)/x = 5l/y or
d/x = 5l/y - 8l/x
from 1&2
3l/y = 5l/y - 8l/x
8l/x = 2l/y
x/y = 4
or speed of train is four times of speed of cat.