To find the number of ways to write the 7 digit phone number if the first digit cannot be zero or one and the last digit must be seven:
So,
For the first digit, there are 8 possible numbers from 2 to 9.
For the second digit, there are 10 possible numbers from 0 to 9.
For the third digit, there are 10 possible numbers from 0 to 9.
For the fourth digit, there are 10 possible numbers from 0 to 9.
For the fifth digit, there are 10 possible numbers from 0 to 9.
For the sixth digit, there are 10 possible numbers from 0 to 9.
For the seventh digit, there is only 1 possible number 7.
Hence,

Hence, the number of possible ways are,
