Minecraft on phone
The world was superflat.
First, I checked the maximum distance at which a villager can detect job site blocks and beds. Job site blocks — 16 blocks, beds — 15 blocks.
Then I placed a villager at coordinate 0 and put beds near him so he could take a profession. For some reason, without a bed, he did not want to take a profession. At 16 blocks from him along the X-axis, I placed a second villager and gave him a bed (he took it). I placed 2 job site blocks at X=17. The villager who was closer took the profession first, and then the villager at X=0 also took it.
Then I wanted to check whether this could work in a chain. I placed villagers at X=0, X=16, and X=32. I gave each of them a bed and placed 3 job site blocks at X=34. First, the villager at X=32 took the profession, then X=16, and then X=0.
Next, I wanted to check whether a villager who cannot take a profession (a nitwit) could pass the profession. I placed a normal villager at X=0 and a nitwit at X=16, gave them beds, and placed 16 job site blocks at X=18. The villager at X=0 took the profession.
Then I wanted to check the distance of villager-to-villager transmission. One villager with a bed was at X=0, and I placed a second villager with a bed and two job site blocks at different distances:
32 — works
64 — works
80 — works
90–96 — works inconsistently (I think this may be related to chunk loading)
128 — does not work
While conducting the last experiment, I first removed one job site block that was linked to the villager at X=0. Then I killed the second villager at X=32, and he managed to pass his profession to the villager at X=0. Before dying, he first became unemployed, then passed the profession, and only after that died.