After completing the "The Man Who Can't Remember" substory from chapter 4, you can continue giving him recovery items to build up the friendship gauge. Note that you have to leave the area and then come back before you can give him another item (go into a building somewhere then leave and come back).
When you first come back to him after completing the substory, you'll need to give him multiple recovery items until the orange gauge above him fills up (you'll see it when you give him an item). The better quality Vitality Pills (/All-Purpose Pills) fill the gauge faster. Although you can give him Frenzy Pills, they don't have any effect on the gauge.
When you fill the orange gauge, the man gets up. Ryoma again asks what happened, but he can't remember. He thanks Ryoma for his help and rewards him with a Good Quality Wood.
When you next come back, you again have to fill up the orange gauge by giving him Vitality Pills (/All-Purpose Pills).
When you fill the orange gauge, the man gets up. Again, he can't remember what happened. He rewards Ryoma with a Robust Wood.
When you next enter the area, Ryoma hears the man fall and rushes over. Keep giving him recovery items to fill the orange gauge.
When you fill the orange gauge, the man gets up. Again, he can't remember, but this time Ryoma tries to force him to remember, telling him someone might be out to kill him. The man tells Ryoma he saw a cat, then went to follow it and he says he felt there was someone behind him. Then he turned around and didn't see anyone, so he thought he was imagining things, then he turned back around again... but can't remember any more than that. He rewards Ryoma with a 1000 Year Old Tree Branch.
When you next enter the area and approach the man's location, Ryoma notices the man is fine. He then says he should stand by and watch what happens, just in case he falls again. A cat shows up, then leaves. The man wonders if he has some kind of disease, which is why he keeps collapsing and that he should perhaps see a doctor, but then the man spots Ryoma and asks him what he's up to. Ryoma tells him he was going to watch what happens to him, in case he fell again. Then the man goes to walk forward and slips on the banana peel. Turns out that's what has been making him fall over all this time! The man rewards Ryoma with a Sacred Tree Wood. After that, the friendship gauge is maxed out.