Answer
See below
Work Step by Step
40% of the tomatoes are partially rotten
30% of the tomatoes have been fed on by insects
12% are partially rotten and have been fed on by insects.
Substituting into the formula $P(A orB)=P(A)+P(B)-P(AandB)$ we have: $0.4+0.3-0.12=0.58=58\%$
The probability that a randomly selected tomato is partially rotten or has been fed on by insects is $58\%$