How many one digit numbers use only 2,5,7?

3, as you have 3 choices for the digit.

How many two digit numbers use only 2,5,7?

3*3, as you have 3 choices for the first digit, and 3 choices for the second.

(22, 25, 27, 52, 55, 57, 72, 75, 77)

Similarly, there are 3*3*3 three digit numbers that use only 2,5,7.

So..