The first one asked for them, the second one didn't.
The question is:
If there are people 1 and 2, without any other information (like motive) available to us, who send spiders to a and b respectively without anything else being done wrong, a and b should receive same compensation and 1 and 2 the same punishment.
If courts can prove that say 2 knew that b was allergic to these spiders and sent them anyways, that's no longer about sending spiders but causing potential bodily harm.
This doctrine is used nowadays in many places already, ie trying to do something even if you don't succeed is criminal in many cases.