主人 in context: a husband or an innkeeper
Read 主人 through two scenes: a husband leaving home earlier than the speaker and an innkeeper explaining a mountain trail. The surrounding relationship and action identify the person.
The husband in a morning routine
主人 (しゅじん) means husband in “主人は毎朝、私より早く家を出る。” (“My husband leaves home earlier than I do every morning.”). The comparison 私より早く concerns when he leaves home relative to the speaker: earlier than I do.
毎朝 makes this a recurring morning routine. The sentence describes the husband's usual departure from home, rather than a single occasion on which he happened to leave first.
The innkeeper in 宿の主人
In “宿の主人が、近くの登山道を教えてくれた。” (“The innkeeper told us about a nearby mountain trail.”), 主人 refers to the innkeeper. 宿の connects this person with the inn, and the completed action is telling the visitors about a nearby mountain trail.
Reading the person as the speaker's husband would change the relationship in this scene. The sentence identifies an innkeeper who gave information; it does not establish who legally owns the building.
Identify the person from the scene
The same spelling does not make these examples one continuous family story. The morning scene refers to a husband, while the inn scene refers to the innkeeper.
Keep each person with the action described: the husband leaves home earlier every morning, and the innkeeper told the visitors about the trail. That relationship and action guide the choice of meaning.
Must 主人 in 宿の主人が、近くの登山道を教えてくれた be the speaker's husband?
Show the answer and why
No. 宿の主人 refers to the innkeeper in this scene. 宿の identifies the connection with the inn, and the action is explaining a nearby mountain trail.

