Here ,we can find:
$|A| = \left \lfloor \frac{500}{3} \right \rfloor = 166$
$|B| = \left \lfloor \frac{500}{5} \right \rfloor = 100$
$|C| = \left \lfloor \frac{500}{7} \right \rfloor = 71$
$|A\cap B| = \left \lfloor \frac{500}{LCM(3,5)} \right \rfloor =\left \lfloor \frac{500}{15} \right \rfloor = 33 $
$|B\cap C| = \left \lfloor \frac{500}{LCM(5,7)} \right \rfloor =\left \lfloor \frac{500}{35} \right \rfloor = 14 $
$|A\cap C| = \left \lfloor \frac{500}{LCM(3,7)} \right \rfloor =\left \lfloor \frac{500}{21} \right \rfloor = 23 $
$|A\cap B \cap C| = \left \lfloor \frac{500}{LCM(3,5,7)} \right \rfloor =\left \lfloor \frac{500}{105} \right \rfloor = 4 $
Now we,can Apply Principle of Inclusion - Exclusion:
$(|A| \cup |B| \cup |C|) = |A| + |B| + |C|- | A\cap B| - | B\cap C| - | A\cap C| + | A\cap B\cap C|$
Put the values:
$(|A| \cup |B| \cup |C|) = 166+100+71-33-14-23+4$
$(|A| \cup |B| \cup |C|) = 341-70$
$(|A| \cup |B| \cup |C|) = 271$
Number 1 to 500 is not divisible by either 2,3 or 5:
${(|A| \cup |B| \cup |C|)}' = N(U) - (|A| \cup |B| \cup |C|)$
${(|A| \cup |B| \cup |C|)}' = 500-271$
${(|A| \cup |B| \cup |C|)}' =229$
So, the number of integers between $1$ and $500$ (both inclusive) that are divisible by $3$ or $5$ or $7$ is $:271$