Tom had left home and had ridden the bike for seven km before the chain broke. Tom had to walk home after this. During the trip back, Tom evaluated that he biked five times faster than he walked. If complete trip took him 5 hours and 24 minutes, find his walking and riding speeds?