I had a very similar scenario recently. My horse is also 5-years old. We were walking up a familiar trail, at an area just before a cross-trail intersection.
Suddenly, a guy pops out of the woods and shoots across the intersection on mountain bike- full speed. My horse had never seen a bike, never-mind blasting out of the woods at full speed directly in front of us.
He turned to bolt, and I tried to very quickly spin him back around to face the biker. This resulted in several VERY FAST turns while edging into the woods. After the first couple turns I thought I might come off... but I knew if we straightened out he would bolt. Luckily for me, I didn’t come off.
Once he stopped turning (I made sure we ended still facing the bike on the trail), he tried backing away from the bike instead. He got about 15 or 20 steps backwards down the trail before he finally gave up, and stood staring at the bike from afar.
The biker had stopped immediately and was patiently waiting us out. After I managed looking at the bike without turning or backing, we slowly advanced towards the rider.
My guy was very brave, and I was able to get him up behind the bike to sniff and investigate. He greeted the rider as well. Then, I had the biker leave us... and we followed him up the trail a few paces before he left us.
The next weekend, my husband brought his mountain bike and we rode together. We followed the bike for the first few miles, and then we left it and came back, passed it, allowed it past us, etc. Hopefully next time we encounter a bike in the “wild” we will be slightly more prepared.