<s>[INST] How many four-digit positive integers are there that contain the digit $3$ and are divisible by $5$? 
How many four-digit positive integers are there that contain the digit $3$ and are divisible by $5$?

The answer is: 
the  number of four-digit integers that are divisible by $5\;-\;$ the number of four-digit integers that are divisible by $5$ and not contain the digit $3$
So, $9\cdot10\cdot10\cdot2-8\cdot 9\cdot 9\cdot 2=1800-1296=504\tag{*}$
I know that, but when I tried to solve this problem with an other way I got a different result.
Four digit integers : $\overline{xyzw}$
Suppose $\overline{xyzw}$ contain at least one digit equal $3$
So, $x = \{1, \ldots ,9\}, y = 3, z = \{0, \ldots, 9\}, w = \{0,5\}$
or $x = \{1, \ldots, 9\}, y = \{0, \ldots, 9\}, z = 3, w = \{0,5\}$
or $x = 3, y=\{0, \ldots, 9\}, z = \{0, \ldots, 9\}, w = \{0,5\}$
The number of all $\overline{xyzw}$ that must be divisible by $5$ and contain $3$ is: $9\cdot 10\cdot 2+9\cdot 10\cdot 2+10\cdot 10\cdot 2=180+180+200=560\tag{**}$
but (*) contradicts (**), so where is the mistake?
 [/INST] You are over counting a few cases. For example, $1330$ is counted in the first case when  $x\in\{1,…,9\},y=3,z\in\{0,…,9\},w\in\{0,5\}$ and it is counted again in the second case when $x\in\{1,…,9\},y\in\{0,…,9\},z=3,w\in\{0,5\}$
</s>