How to know what the expected value is?
The expected value is what the values would be if the tested conditions had no effect on the sample distribution. In your case, you are testing the effect of herbicides on butterfly populations. If the presence of herbicides wouldn't matter you would expect an equal number of butterflies on fields with herbicides as without.

So, the total number of butterflies being $37 + 3 = 40$, you would expect $\frac{40}{2} = 20$ butterflies on fields without and $\frac{40}{2} = 20$ on fields with herbicides.