Amon didn't find the recipe from a lucky encounter. He had actually used his private wealth to get the recipe. A wealth that he gained from San Guo's drug trading operation of the Thousand Dream Powder. The pill was indeed very rare, the recipe was even more so. It was San Guo who had acquired the recipe from a black market auction, under Amon's request.
Amon had stopped exposing Madam Lin to the airborne drug that weakened her womb since before the White Cloud Tournament. After dabbling for a long time with medicine, Amon could also make some sort of assessment. He figured that after such a long exposure, Madam Lin's womb might have been permanently damaged. Even if he stopped exposing her to the drug, she would still not be able to bear a child.
This womb-strengthening pill could change that, though. Amon had learned about this pill from one of the medicinal books he read, and thus tasked San Guo to find it.