Are they all different cases??
Let's assume that the numbers do not start with 0 or 555.
Or means you have to sum up the possible ways of each of these situations when you compute them independently.
If it does not start with 0:
for the first digit you can take 9 possible actions. and for the rest of the digits you have 10.
so that will be 9*(10)^6
If it does not start with 555:
for this part for calculating the ways consider all situations(10^7) minus the situations in which he number starts with 555(10^4) so we have = 10^7 - 10^4
for both the statements together = 9*(10^6) + 10^7 - 10^4
----------------------
for the part which says either has no 8 or no 9
as I said you should consider each one independently:
if it has no 8:for all the digits you only have to choose among 9 numbers(0,1,2,3,4,5,6,7,9) so it is 9^7
if it has no 9:for all the digits you only have to choose among 9 numbers(0,1,2,3,4,5,6,7,8) so it is 9^7
and both together is 9^7+9^7 = 2*9^7
-------------------------------------------------
for the part which says either has no 8 and no 9
these two situations should be taken together:
the number does not have 2 specific digits among 10 possible digits so you can choose among only 8 digits: 8^7
I hope you asked about the same things as I explained
Arash