ANSWER :-
Total distance covered =25km
let distance covered in foot at 3.5kmph=x 25km
therefore,distance covered on cycle at 9 kmph=(25-x)kmph
time taken to cover x km= distance/speed =x/3.5
time taken to cover (25-x) km= (25-x)/9
Total time to cover 25km=4hr
x/3.5+ (25-x)/9 =4
by taking lcm
9x+3.5 (25-x) =4×3.5×9
9x+87.5+3.5x =126
5.5x = 38.5
x= 7km
therefore, distance covered on foot at 3.5kmph= 7km