The printed numerical example reverses the digits and contradicts both definitions. With the stated last-digit definition, gives , . Use those definitions throughout.
Put and . The exponential distribution givesThe Euclidean division has unique remainder and quotient . Thus the joint probability mass function isand zero otherwise. This is decimal digit decomposition of a geometric random variable. Following the erroneous example instead would require different definitions and would not answer the stated question.