Think of the SS numbers as being a collection of digits. If any of the digits (say the first one for example) are 8 then all the remaining digits can be anything but 8, meaning there are 9 choices for each remaining digit. This effectively becomes an 8 digit number with the constraint that there can only be 9 choices for a digit. This means for the first digit being 8 we have 9⁸ remaining possible numbers. Since we will do this for each of the remaining digits (they each get to be 8 then we count their 9⁸ configurations) we end up with 9(9⁸) or 9⁹≈3.8742E8
Step by Step divide the the normal price of the book by four to get the amount of the book on sale in store B which is $21. To get the answer for Store A divide the normal price of the book by ten then divide the amount you get by 2 and add the two amounts up to get the the amount of the book on sale which is $21.26