<s>[INST] How many $4$-digit numbers can be formed using digits $0,1,...6$ such that it contains the digits $3$ and $5$? How many $4$-digit numbers can be formed using digits $0,1,...6$ such that it contains the digits $3$ and $5$?
My try:
All possible $4$-digit numbers $= 7 \cdot 7 \cdot 7 \cdot 6$ 
$4$-digits numbers NOT containing $3, 5 = 5 \cdot 5 \cdot 5 \cdot 4$
Answer= $7 \cdot 7 \cdot 7 \cdot 6-5 \cdot 5 \cdot 5 \cdot 4 =1558$ 
Is that OK ?  If not, please explain my mistake. 
Thank you. 
 [/INST] You also need to subtract out the number of numbers that contain one or more $5$s but no $3$, as well as the number of numbers that contain one or more $3$s but no $5$.
Or, you can also just count directly:


*

*One $3$, one $5$, two something else

*One $3$, two $5$s, one something else

*Two $3$s, one $5$, one something else

*Three $3$s, one $5$

*Two $3$s, two $5$s

*One $3$, three $5$s

</s>