There is an assumption here that is left out of the problem. I assume that the digits 0,1,2,3,...,8,9 are all equally likely to occur as the last digit. That this, there isn't some rule that says a phone number cannot end in a 3.
It really doesn't matter how many digits long the phone number . What matters is only the last digit. So, if we are allowed to use any of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and each is equally likely to be used then the probability that someone's number ends in 5 is 1/10.
Since there are 5 people, the probability that they all end in 5 is obtained by multiplying the probability that each person's number ends in 5. That is,
