By and With
Both by and with can be used to say how somebody does something, but there is an important difference.
We use by when we say what we do to get a result.
The boy killed the spider by hitting it. (Note the use of the -ing form after by.)
We got them to listen by shouting.
He succeeded by hard work.
We use with when we say what we use to get a result.
The boy killed the spider with a shoe. (NOT …by a shoe.)
Without is the opposite of both with and by in these cases.
We got her to listen by shouting.
You can’t get her to listen without shouting.
We got it out with a screwdriver.
We couldn’t get it out without a screwdriver.
Passive clauses
In passive clauses by introduces the agent – the person or thing that does an action.
The spider was killed by the boy.
I was welcomed by the hostess herself.
This house is lit by electricity.
She was knocked down by a car.
With is used to refer to the instrument or tool used by somebody.
The spider was killed by the boy with a stone.