You take the number of respondents who said pesticides are “not at all annoying” and divide it by the number of total respondents. So you would divide 407 by 1013 (407/1013) then multiply what you get by 100. You get 40%
The "mean" is the "average" you're used to, where you add up all the numbers and then divide by the number of numbers. The "median" is the "middle" value in the list of numbers