Mr. Beaver knew because Lucy mentioned how Edmund had been in Narnia but hadn't known where he'd been. When they started talking about the prophesy Edmund sneaked out of the beaver dome and went to the castle. When the hounds showed up trying to break in Beaver knew he had gone to the The witch's castle.
The false causation fallacy is a category of informal fallacies in which a cause is incorrectly identified. For example, "my going to sleep causes the sun to set." The two events may coincide, but have no causal connection.