I am on Bedrock edition and it was my first time doing this.
1 Answer
You had a 2.8% chance of rolling mending on your third villager.
Explanation: If I counted correctly, there are 106 possible enchanted books (including different levels) that a villager can trade. Thus mending has a 1 in 106 chance of appearing. Mending has a cost of between 10 and 38 emeralds, with the chance of cost evenly distributed.
7 emeralds is apparently impossible (without any trading discounts) according to the wiki, though the wiki is generally more accurate for java than bedrock.
Source: (note 7)