How did it know what they were laughing at?
"and that his laughing and pointing were so unacceptable that he was required to pay the man he had laughed at five hundred pounds in compensation for inferring by his laughter that the man did not look like a woman."
Which is wrong.
There is no way the guy can "infer" something by laughing. He might "imply" what he is thinking by laughing at him/her/xie whatever, but an "inference" is something all together different.