a person covers a distance of 31 km and displacement 3 kms and time 25.5 min calcuclate average velocity

since velocity involves final displacement, not total distance covered, you have

3km/25.5min = 0.1176 km/min
in the direction from start to finish.