Answer: 1 hour
Step-by-step explanation:
Let the distance they walked be [tex]d_1[/tex] in time [tex]t_1[/tex] and the distance they walked be [tex]d_2[/tex] in time [tex]t_2[/tex] ,then
Walking speed=[tex]\frac{d_1}{t_1}=4[/tex]
[tex]\\\Rightarrow\ d_1=4t_1[/tex]
Riding speed=[tex]\frac{d_2}{t_2}=12[/tex]
[tex]\\\Rightarrow\ d_2=12t_1[/tex]
Also the total time taken=3 hours
∴[tex]t_1+t_2=3\\\Rightarrow\ t_2=3-t_1[/tex]...(1)
Since the total distance= 20 km
∴[tex]d_1+d_2=20\\\Rightarrow4t_1+12t_2=20\\\Rightarrow4t_1+12(3-t_1)=20..............[\text{from (1)}]\\\Rightarrow4t_1+36-12t_1=20\\\Rightarrow-8t_1=-8\\\Rightarrow\ t_1=1[/tex]
Thus, the they spent 1 hour time in walking.